Try to normalise use of int64/long int across raw/locale convert.
authorCarl Hetherington <cth@carlh.net>
Mon, 12 Sep 2016 10:13:40 +0000 (11:13 +0100)
committerCarl Hetherington <cth@carlh.net>
Mon, 12 Sep 2016 10:13:40 +0000 (11:13 +0100)
src/locale_convert.cc
src/locale_convert.h

index fc156244929d2c29f7e39f42b671b98aae221a14..129ee50fd3bad985d8ca927d9aa3b40e2ec2010d 100644 (file)
@@ -185,11 +185,11 @@ dcp::locale_convert (string x, int, bool)
 }
 
 template<>
-int64_t
+long int
 dcp::locale_convert (string x, int, bool)
 {
-       int64_t y = 0;
-       sscanf (x.c_str(), "%" PRId64, &y);
+       long int y = 0;
+       sscanf (x.c_str(), "%ld", &y);
        return y;
 }
 
index 760e106869805b3c0071a63619ef3585ba45969e..0572840915de05bc80f3d1f9c6880e82f8ea8162 100644 (file)
@@ -112,7 +112,7 @@ int
 locale_convert (std::string x, int, bool);
 
 template <>
-int64_t
+long int
 locale_convert (std::string x, int, bool);
 
 template <>