Closed Bug 388546 Opened 18 years ago Closed 17 years ago

aRuleDetail parameters to nsRuleNode::Compute*Data don't need to be references

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
trivial

Tracking

()

RESOLVED FIXED
mozilla1.9alpha8

People

(Reporter: dbaron, Assigned: dbaron)

Details

Attachments

(1 file)

Attached patch patchSplinter Review
These parameters are passed by reference when they could just be passed by value. (I noticed this in the debugger while looking at bug 383979.)
Attachment #272739 - Flags: superreview?(bzbarsky)
Attachment #272739 - Flags: review?(bzbarsky)
(I'm tempted to use const on the parameters in the implementation, except Mozilla code very rarely uses const on parameters (const int, void *const, etc.) where the const is not part of the function signature. We probably should, though. I sort of wish it were the default in C++.)
Comment on attachment 272739 [details] [diff] [review] patch r+sr=bzbarsky, and I have no problem with making those |const RuleDetail|. Would be a good idea, imo.
Attachment #272739 - Flags: superreview?(bzbarsky)
Attachment #272739 - Flags: superreview+
Attachment #272739 - Flags: review?(bzbarsky)
Attachment #272739 - Flags: review+
OK, I'll add the consts in the implementation only -- that's legal, and I think probably less confusing for those reading the header.
Fix checked in to trunk.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: