Closed
Bug 629289
Opened 15 years ago
Closed 15 years ago
forcing value to bool (performance warning C4800)
Categories
(Core :: Disability Access APIs, defect)
Core
Disability Access APIs
Tracking
()
RESOLVED
FIXED
mozilla2.0b11
People
(Reporter: surkov, Assigned: surkov)
Details
(Keywords: access)
Attachments
(1 file)
|
2.73 KB,
patch
|
davidb
:
review+
davidb
:
approval2.0+
|
Details | Diff | Splinter Review |
No description provided.
Attachment #507365 -
Flags: review?(bolterbugz)
Attachment #507365 -
Flags: approval2.0?
Comment 1•15 years ago
|
||
Comment on attachment 507365 [details] [diff] [review]
patch
I'm not sure this patch actually fixes perf right? There is still a !! conversion. Does just adding !! fix the warning?
| Assignee | ||
Comment 2•15 years ago
|
||
(In reply to comment #1)
> Comment on attachment 507365 [details] [diff] [review]
> patch
>
> I'm not sure this patch actually fixes perf right?
there is I think, implicit conversion costs something.
> There is still a !!
> conversion.
for the second case
> Does just adding !! fix the warning?
yes, perhaps static_cast<bool> is better here, dunno
| Assignee | ||
Comment 3•15 years ago
|
||
Neil, what's better:
bool IsBoundToParent() const { return !!mParent; }
or
bool IsBoundToParent() const { return static_cast<bool>(mParent); }
Comment 4•15 years ago
|
||
(In reply to comment #3)
> bool IsBoundToParent() const { return static_cast<bool>(mParent); }
Neil tells me this won't remove the warning.
Comment 5•15 years ago
|
||
Comment on attachment 507365 [details] [diff] [review]
patch
r+a=me, we probably don't want to take two many low priority bugs like this until after 4 ships. Can you ride this patch along one of your pushes to try to make sure we don't have an freaky failures?
Attachment #507365 -
Flags: review?(bolterbugz)
Attachment #507365 -
Flags: review+
Attachment #507365 -
Flags: approval2.0?
Attachment #507365 -
Flags: approval2.0+
| Assignee | ||
Comment 6•15 years ago
|
||
landed on 2.0 - http://hg.mozilla.org/mozilla-central/rev/a2d89cf5cd18
Target Milestone: --- → mozilla2.0b11
| Assignee | ||
Updated•15 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•