From: Mikko Rasa Date: Tue, 5 Oct 2021 22:08:46 +0000 (+0300) Subject: Change remaining fixed-size integers to standard types X-Git-Url: http://git.tdb.fi/?p=libs%2Fdatafile.git;a=commitdiff_plain;h=ffdab05698de3d2d612f04ffc146381c2362d386 Change remaining fixed-size integers to standard types --- diff --git a/source/binaryparser.cpp b/source/binaryparser.cpp index a8b350d..e105393 100644 --- a/source/binaryparser.cpp +++ b/source/binaryparser.cpp @@ -200,7 +200,7 @@ IntType::Store BinaryParser::parse_int() FloatType::Store BinaryParser::parse_float() { - UInt64 encoded = 0; + uint64_t encoded = 0; for(unsigned i=0; i>(i*8))&0xFF); } diff --git a/source/type.h b/source/type.h index fdd040d..151f2ca 100644 --- a/source/type.h +++ b/source/type.h @@ -1,7 +1,7 @@ #ifndef MSP_DATAFILE_TYPE_H_ #define MSP_DATAFILE_TYPE_H_ -#include +#include #include #include @@ -23,7 +23,7 @@ struct Symbol struct IntType { static const char signature = 'i'; - typedef Int64 Store; + typedef std::int64_t Store; typedef Store Load; }; @@ -96,19 +96,11 @@ struct TypeInfo: IntType { }; template<> struct TypeInfo: IntType { }; -#if defined(_MSC_VER) -template<> -struct TypeInfo<__int64, false>: IntType { }; - -template<> -struct TypeInfo: IntType { }; -#elif defined(__GNUC__) template<> struct TypeInfo: IntType { }; template<> struct TypeInfo: IntType { }; -#endif template<> struct TypeInfo: FloatType { };