Review Request 122493: Use math.h round rather than C++11 std::lround.

Mark Gaiser markg85 at gmail.com
Mon Feb 9 00:59:05 UTC 2015


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


-1

You use C-Style casts. Oke, the frameworks coding style doesn't seem to explicitly forbid it (casts are not mentioned), but if i recall correctly we use the Qt style + some of our own which means we should obey the Qt style [1] which does mention casts and forbids the C-Sytle cast.

Secondly, you seem to be trying to get this working on a compiler that isn't supported [2]. If one of those compilers have issues with std::lround (which i seriously doubt) then we should perhaps look into replacing it with qRound. However, Qt is also moving away from it's own algorithms in favor of the stl ones so we should stick to the std:: versions.

Cheers

[1] http://qt-project.org/wiki/Qt_Coding_Style
[2] https://community.kde.org/Frameworks/Policies#Frameworks_compiler_requirements_and_C.2B.2B11

- Mark Gaiser


On Feb. 8, 2015, 11:12 p.m., Jeremy Whiting wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/122493/
> -----------------------------------------------------------
> 
> (Updated Feb. 8, 2015, 11:12 p.m.)
> 
> 
> Review request for KDE Frameworks and Marco Martin.
> 
> 
> Repository: kdeclarative
> 
> 
> Description
> -------
> 
> Use math.h round rather than C++11 std::lround.
> 
> Removes dependency on C++11.
> 
> 
> Diffs
> -----
> 
>   src/qmlcontrols/kquickcontrolsaddons/plotter.cpp 67ce63a943234b167165b0f3986f974bba5ff0cf 
> 
> Diff: https://git.reviewboard.kde.org/r/122493/diff/
> 
> 
> Testing
> -------
> 
> kdeclarative is able to build on OS X 10.7 with the built in XCode compiler and standard library.
> 
> 
> Thanks,
> 
> Jeremy Whiting
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20150209/e54e1d19/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list