Open Bug 212690 Opened 21 years ago Updated 2 years ago

nsTHashTable use of KeyTypePointer has const issues

Categories

(Core :: XPCOM, defect, P5)

defect

Tracking

()

People

(Reporter: dbradley, Unassigned)

Details

(Keywords: helpwanted)

There are two places, s_HashKey and s_MatchKey, that use a cast to const
KeyTypePointer. I'm not sure the use of const is doing what the author thinks
it's doing in this case. This creates a const pointer to some type, not a
pointer to something const.

For the casual reader, this might lead one to believe they can provide
KeyTypePointer as a non-const pointer, which isn't the case.

It might also make sense to rename KeyTypePointer to ConstKeyTypePointer to make
that clear. Assuming my understanding of this template is correct, and the
ripple effect of such a change isn't too great.
to alec.
Assignee: dougt → alecf
mine, all mine [evil grin]
Assignee: alecf → bsmedberg
Severity: normal → trivial
Priority: -- → P2
Target Milestone: --- → mozilla1.5beta
I think this is probably trivial, but it's way down my priority list. help is
welcome.
Keywords: helpwanted
Priority: P2 → P4
Target Milestone: mozilla1.5beta → ---
QA Contact: scc → xpcom
Assignee: benjamin → nobody
Priority: P4 → P5
Severity: trivial → S4
You need to log in before you can comment on or make changes to this bug.