[Okular-devel] Review Request 119133: Include <cstdlib> instead of <cmath> for std::abs(int).

Kai Uwe Broulik kde at privat.broulik.de
Sat Jul 5 16:52:34 UTC 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/119133/#review61653
-----------------------------------------------------------


What about just using qAbs instead of std::abs?

- Kai Uwe Broulik


On Juli 5, 2014, 4:10 nachm., Raphael Kubo da Costa wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/119133/
> -----------------------------------------------------------
> 
> (Updated Juli 5, 2014, 4:10 nachm.)
> 
> 
> Review request for Okular.
> 
> 
> Repository: okular
> 
> 
> Description
> -------
> 
> This fixes the build with libc++ after 8872524:
> 
> core/utils.cpp:142:24: error: call to 'abs' is ambiguous
>                     && std::abs(static_cast<int>(selectedOutput->edid()->width()*10) - szMM.width()) < 10
>                        ^~~~~~~~
> /usr/include/c++/v1/cmath:660:1: note: candidate function
> abs(float __x) _NOEXCEPT {return fabsf(__x);}
> ^
> /usr/include/c++/v1/cmath:664:1: note: candidate function
> abs(double __x) _NOEXCEPT {return fabs(__x);}
> ^
> /usr/include/c++/v1/cmath:668:1: note: candidate function
> abs(long double __x) _NOEXCEPT {return fabsl(__x);}
> ^
> 
> core/utils.cpp:143:24: error: call to 'abs' is ambiguous
>                     && std::abs(static_cast<int>(selectedOutput->edid()->height()*10) - szMM.height()) < 10)
>                        ^~~~~~~~
> /usr/include/c++/v1/cmath:660:1: note: candidate function
> abs(float __x) _NOEXCEPT {return fabsf(__x);}
> ^
> /usr/include/c++/v1/cmath:664:1: note: candidate function
> abs(double __x) _NOEXCEPT {return fabs(__x);}
> ^
> /usr/include/c++/v1/cmath:668:1: note: candidate function
> abs(long double __x) _NOEXCEPT {return fabsl(__x);}
> ^
> 
> 
> Diffs
> -----
> 
>   core/utils.cpp 71442f0e60bc3998c676ac9670964dbd9213e146 
> 
> Diff: https://git.reviewboard.kde.org/r/119133/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Raphael Kubo da Costa
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20140705/4058210b/attachment.html>


More information about the Okular-devel mailing list