URL:
<http://gna.org/bugs/?9248>
Summary: round() in src/util.hpp
Project: Battle for Wesnoth
Submitted by: hennequi
Submitted on: jeudi 31.05.2007 à 09:29
Category: Bug
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 1.3.3
Operating System: solaris8
_______________________________________________________
Details:
In file src/util.hpp, round_double() uses the round() function.
round() is not POSIX and is undefined on Solaris/gcc.
A better solution is to use anycase the macro definition with
POSIX ceil() and floor() function :
inline int round_double(double d) {
return static_cast<int>((d >= 0.0)? floor(d + 0.5) : ceil(d - 0.5));
}
best regards
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?9248>
_______________________________________________
Message posté via/par Gna!
http://gna.org/
_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs