Closed
Bug 848611
Opened 11 years ago
Closed 11 years ago
MathAlgorithms.h:116: error: 'fabsl' was not declared in this scope
Categories
(Core :: MFBT, defect)
Tracking
()
RESOLVED
FIXED
mozilla22
People
(Reporter: romaxa, Assigned: romaxa)
References
Details
Attachments
(1 file)
1002 bytes,
patch
|
Waldo
:
review+
|
Details | Diff | Splinter Review |
gcc version 4.4.1 ('cs2009q3-hard-67-sb16')
Assignee | ||
Comment 1•11 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=845433bb075d
Assignee | ||
Updated•11 years ago
|
Attachment #721956 -
Flags: review?(jwalden+bmo)
Comment 2•11 years ago
|
||
Comment on attachment 721956 [details] [diff] [review] Use cmath and std::fabs Review of attachment 721956 [details] [diff] [review]: ----------------------------------------------------------------- You might need to rebase through changes in bug 847480, assuming relevant bits land before this. Note that'll be temporarily semi-duplicating Abs into DeprecatedAbs, so you'll need to update two places, not one, to properly rebase. ::: mfbt/MathAlgorithms.h @@ +12,5 @@ > #include "mozilla/StandardInteger.h" > #include "mozilla/TypeTraits.h" > > #include <limits.h> > +#include <cmath> <cmath> goes before <limits.h>, alphabetically. @@ +112,5 @@ > template<> > inline long double > Abs<long double>(const long double d) > { > + return std::fabs(d); If we're going to use the std::-qualified std::fabs here, we really should use it (well, the other overloads of it, guaranteed by C++98) for the others as well. (Not least because <cmath> only provides the std:: versions, technically, and not the :: versions.)
Attachment #721956 -
Flags: review?(jwalden+bmo) → review+
Assignee | ||
Comment 3•11 years ago
|
||
https://tbpl.mozilla.org/php/getParsedLog.php?id=20634933&tree=Try#error0 MathAlgorithms.h:102:10: error: 'fabsf' is not a member of 'std'
Comment 4•11 years ago
|
||
std::fabs is overloaded for float, double, and long double according to C++98, so I think every instance -- including the float one -- should just call std::fabs with that method's argument.
Assignee | ||
Comment 5•11 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=41a079162e01
Assignee | ||
Comment 6•11 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=7e6259783766
Assignee | ||
Comment 7•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/051405e33fc4
Comment 8•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/051405e33fc4
Assignee: nobody → romaxa
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
You need to log in
before you can comment on or make changes to this bug.
Description
•