]> granicus.if.org Git - icinga2/commitdiff
Fix Convert::ToLong(double val) 6924/head
authorMichael Friedrich <michael.friedrich@icinga.com>
Wed, 30 Jan 2019 13:47:59 +0000 (14:47 +0100)
committerMichael Friedrich <michael.friedrich@icinga.com>
Wed, 30 Jan 2019 13:47:59 +0000 (14:47 +0100)
lib/base/convert.hpp

index 8b9000d05388f76f1d51a447ec22c9c54dddb65d..bb7bd3e5ca4008b841dc7edb12d7839c00518870 100644 (file)
@@ -64,6 +64,11 @@ public:
                return val;
        }
 
+       static long ToLong(double val)
+       {
+               return static_cast<long>(val);
+       }
+
        static double ToDouble(const Value& val)
        {
                return val;