Add "explicit" constructor annotations for DMD

RESOLVED FIXED in mozilla34

Status

()

defect
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: mccr8, Assigned: mccr8)

Tracking

Trunk
mozilla34
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Assignee

Description

5 years ago
This was giving me trouble at some point, though I think the actual case that was bothering me has already been fixed.  I just did this by manual inspection.
Assignee

Updated

5 years ago
Blocks: 1058178

Comment 1

5 years ago
Thanks for doing this!
Assignee

Comment 2

5 years ago
Attachment #8480136 - Flags: review?(n.nethercote)
Comment on attachment 8480136 [details] [diff] [review]
Add explicit ctor annotations in DMD.cpp.

Review of attachment 8480136 [details] [diff] [review]:
-----------------------------------------------------------------

::: memory/replace/dmd/DMD.cpp
@@ +2061,5 @@
>      RecordKey key(b);
>      RecordTable::AddPtr p = table->lookupForAdd(key);
>      if (!p) {
> +      const RecordKey k(b);
> +      Record tr(k);

Whoa, that was dubious. I think you can use |key| from above and not create |k|.
Attachment #8480136 - Flags: review?(n.nethercote) → review+
Assignee

Comment 4

5 years ago
(In reply to Nicholas Nethercote [:njn] from comment #3)
> Whoa, that was dubious.
Yeah...

> I think you can use |key| from above and not create |k|.
Oops, thanks!  I noticed that at some point but failed to actually fix it.

https://hg.mozilla.org/integration/mozilla-inbound/rev/b256487e7f73
https://hg.mozilla.org/mozilla-central/rev/b256487e7f73
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
You need to log in before you can comment on or make changes to this bug.