From ffdab05698de3d2d612f04ffc146381c2362d386 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Wed, 6 Oct 2021 01:08:46 +0300 Subject: [PATCH] Change remaining fixed-size integers to standard types --- source/binaryparser.cpp | 2 +- source/binarywriter.cpp | 2 +- source/type.h | 12 ++---------- 3 files changed, 4 insertions(+), 12 deletions(-) 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 { }; -- 2.43.0