Closed Bug 1613834 Opened 6 years ago Closed 6 years ago

Redundant condition in nsTableCellMap::RemoveColsAtEnd

Categories

(Core :: Layout: Tables, enhancement)

74 Branch
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla74
Tracking Status
firefox74 --- fixed

People

(Reporter: alexhenrie24, Assigned: alexhenrie24)

Details

Attachments

(1 file)

nsTableCellMap::RemoveColsAtEnd currently has the following code:

int32_t numCols = GetColCount();
int32_t lastGoodColIndex = mTableFrame.GetIndexOfLastRealCol();
for (int32_t colX = numCols - 1; (colX >= 0) && (colX > lastGoodColIndex);
     colX--) {

It's unnecessary to check that colX is at least 0 because lastGoodColIndex is always at least -1, so if colX is greater than lastGoodColIndex then we already know that colX is at least 0.

Assignee: nobody → alexhenrie24
Status: NEW → ASSIGNED
Pushed by malexandru@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/164ee9eaa19e Remove redundant check from nsTableCellMap::RemoveColsAtEnd. r=dbaron
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla74
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: