mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Fix MSVC build
This commit is contained in:
parent
a365e696e2
commit
9c9c6be175
@ -1388,6 +1388,18 @@ int findToken(char const * const str[], string const & search_token)
|
||||
}
|
||||
|
||||
|
||||
#ifdef _MSC_VER
|
||||
// Replacement for C99 function lround()
|
||||
double round(double x)
|
||||
{
|
||||
if (x < 0)
|
||||
return ceil(x - 0.5);
|
||||
else
|
||||
return floor(x + 0.5);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
std::string formatFPNumber(double x)
|
||||
{
|
||||
// Need manual tweaking, QString::number(x, 'f', 16) does not work either
|
||||
|
Loading…
Reference in New Issue
Block a user