From 6a1280ba8ab5bb32b8edf98a96a0d2a2c88f24aa Mon Sep 17 00:00:00 2001 From: Martchus Date: Wed, 31 Jan 2018 21:00:13 +0100 Subject: [PATCH] Fix warning about implicit conversion --- conversion/stringconversion.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/conversion/stringconversion.cpp b/conversion/stringconversion.cpp index cd9f53d..9a53cb1 100644 --- a/conversion/stringconversion.cpp +++ b/conversion/stringconversion.cpp @@ -270,6 +270,7 @@ const char base64Pad = '='; /*! * \brief Encodes the specified \a data to Base64. + * \sa [RFC 4648](http://www.ietf.org/rfc/rfc4648.txt) */ string encodeBase64(const byte *data, uint32 dataSize) { @@ -309,6 +310,7 @@ string encodeBase64(const byte *data, uint32 dataSize) /*! * \brief Decodes the specified Base64 encoded string. * \throw Throws a ConversionException if the specified string is no valid Base64. + * \sa [RFC 4648](http://www.ietf.org/rfc/rfc4648.txt) */ pair, uint32> decodeBase64(const char *encodedStr, const uint32 strSize) { @@ -328,7 +330,7 @@ pair, uint32> decodeBase64(const char *encodedStr, const uint auto buffer = make_unique(decodedSize); auto *iter = buffer.get() - 1; while (encodedStr < end) { - uint32 temp = 0; + int32 temp = 0; for (byte quantumPos = 0; quantumPos < 4; ++quantumPos, ++encodedStr) { temp <<= 6; if (*encodedStr >= 'A' && *encodedStr <= 'Z') {