Skip to content

Commit 30f6f6b

Browse files
authored
[core] Removed extra redundant condition checks (#2615).
1 parent 5f02310 commit 30f6f6b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

srtcore/fec.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,9 @@ void FECFilterBuiltin::feedSource(CPacket& packet)
453453
HLOGC(pflog.Debug, log << "FEC:feedSource: %" << packet.getSeqNo() << " rowoff=" << baseoff
454454
<< " column=" << vert_gx << " .base=%" << vert_base << " coloff=" << vert_off);
455455

456-
if (vert_off >= 0 && sizeCol() > 1)
456+
// [[assert sizeCol() >= 2]]; // see the condition above.
457+
458+
if (vert_off >= 0)
457459
{
458460
// BEWARE! X % Y with different signedness upgrades int to unsigned!
459461

@@ -468,7 +470,7 @@ void FECFilterBuiltin::feedSource(CPacket& packet)
468470
return;
469471
}
470472

471-
SRT_ASSERT(vert_off >= 0);
473+
// [[assert vert_off >= 0]]; // this condition branch
472474
int vert_pos = vert_off / int(sizeRow());
473475

474476
HLOGC(pflog.Debug, log << "FEC:feedSource: %" << packet.getSeqNo()
@@ -496,7 +498,6 @@ void FECFilterBuiltin::feedSource(CPacket& packet)
496498
}
497499
else
498500
{
499-
500501
HLOGC(pflog.Debug, log << "FEC:feedSource: %" << packet.getSeqNo()
501502
<< " B:%" << baseoff << " H:*[" << horiz_pos << "] V(B=%" << vert_base
502503
<< ")[col=" << vert_gx << "]<NO-COLUMN>"

0 commit comments

Comments
 (0)