diff --git a/io/binaryreader.cpp b/io/binaryreader.cpp index 2d6056f..16afb30 100644 --- a/io/binaryreader.cpp +++ b/io/binaryreader.cpp @@ -132,7 +132,7 @@ string BinaryReader::readString(size_t length) * \deprecated This method is likely refactored/removed in v5. * \todo Refactor/remove in v5. */ -string BinaryReader::readTerminatedString(uint8_t termination) +std::string BinaryReader::readTerminatedString(std::uint8_t termination) { stringstream ss(ios_base::in | ios_base::out | ios_base::binary); ss.exceptions(ios_base::badbit | ios_base::failbit); @@ -153,7 +153,7 @@ string BinaryReader::readTerminatedString(uint8_t termination) * \deprecated This method is likely refactored/removed in v5. * \todo Refactor/remove in v5. */ -string BinaryReader::readTerminatedString(size_t maxBytesToRead, std::uint8_t termination) +string BinaryReader::readTerminatedString(std::size_t maxBytesToRead, std::uint8_t termination) { unique_ptr buff = make_unique(maxBytesToRead); for (char *i = buff.get(), *end = i + maxBytesToRead; i < end; ++i) { diff --git a/io/binaryreader.h b/io/binaryreader.h index b044fba..7c426a5 100644 --- a/io/binaryreader.h +++ b/io/binaryreader.h @@ -65,7 +65,7 @@ public: std::string readLengthPrefixedString(); std::string readString(std::size_t length); std::string readTerminatedString(std::uint8_t termination = 0); - std::string readTerminatedString(size_t maxBytesToRead, std::uint8_t termination = 0); + std::string readTerminatedString(std::size_t maxBytesToRead, std::uint8_t termination = 0); std::string readMultibyteTerminatedStringBE(std::uint16_t termination = 0); std::string readMultibyteTerminatedStringLE(std::uint16_t termination = 0); std::string readMultibyteTerminatedStringBE(std::size_t maxBytesToRead, std::uint16_t termination = 0); @@ -195,7 +195,7 @@ inline void BinaryReader::read(char *buffer, std::streamsize length) /*! * \brief Reads the specified number of bytes from the stream in the character array. */ -inline void BinaryReader::read(uint8_t *buffer, std::streamsize length) +inline void BinaryReader::read(std::uint8_t *buffer, std::streamsize length) { m_stream->read(reinterpret_cast(buffer), length); } @@ -617,7 +617,7 @@ inline void BinaryReader::read(char &oneCharacter) /*! * \brief Reads a single byte/unsigned character from the current stream and advances the current position of the stream by one byte. */ -inline void BinaryReader::read(uint8_t &oneByte) +inline void BinaryReader::read(std::uint8_t &oneByte) { oneByte = readByte(); } diff --git a/io/misc.cpp b/io/misc.cpp index 609a2db..61a86e6 100644 --- a/io/misc.cpp +++ b/io/misc.cpp @@ -12,7 +12,7 @@ namespace IoUtilities { * \throws Throws std::ios_base::failure when an error occurs or the specified \a maxSize * would be exceeded. */ -string readFile(const string &path, std::string::size_type maxSize) +std::string readFile(const std::string &path, std::string::size_type maxSize) { NativeFileStream file; file.exceptions(ios_base::failbit | ios_base::badbit);