Closed Bug 536463 Opened 15 years ago Closed 15 years ago

Fix warning: ‘virtual nsresult nsBox::GetMargin(nsMargin&)’ was hidden [...] by ‘void nsTableOuterFrame::GetMargin

Categories

(Core :: Layout: Tables, defect)

x86
Linux
defect
Not set
trivial

Tracking

()

RESOLVED FIXED

People

(Reporter: dholbert, Assigned: dholbert)

Details

(Whiteboard: [build_warning])

Attachments

(1 file, 1 obsolete file)

With g++ 4.3, I get this build warning when compiling mozilla-central:

> ../../../mozilla/layout/base/../xul/base/src/nsBox.h:74: warning: ‘virtual nsresult nsBox::GetMargin(nsMargin&)’ was hidden
> ../../../mozilla/layout/base/../tables/nsTableOuterFrame.h:270: warning: by ‘void nsTableOuterFrame::GetMargin(nsPresContext*, const nsHTMLReflowState&, nsIFrame*, nscoord, nsMargin&)’

Turns out the guilty function (nsTableOuterFrame::GetMargin) is only called in one place anyway.  Simple fix: rename this method to GetTableMargin.

(Similar to bug 508692)
Attachment #418906 - Flags: review?(dbaron)
Comment on attachment 418906 [details] [diff] [review]
trivial fix: s/GetMargin/GetTableMargin/

r=dbaron if you call it GetChildMargin instead.  (GetTableMargin can be confusing since the outer table often refers to the inner table as the table.  The one caller looks like it calls the function on both children of the outer table:  the inner table and the caption.)
Attachment #418906 - Flags: review?(dbaron) → review+
Good point.  Changed to GetChildMargin in this version.  Thanks!
Assignee: nobody → dholbert
Attachment #418906 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #418930 - Flags: review+
http://hg.mozilla.org/mozilla-central/rev/824e6be7a972
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Whiteboard: [build_warning]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: