commit 9c9c6be1758ddbb7498fb3f567f4be9ecd19be9b
Author: Georg Baum <[email protected]>
Date:   Thu May 14 20:36:12 2015 +0200

    Fix MSVC build

diff --git a/src/support/lstrings.cpp b/src/support/lstrings.cpp
index f7e8b5a..c77c986 100644
--- a/src/support/lstrings.cpp
+++ b/src/support/lstrings.cpp
@@ -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

Reply via email to