diff --git a/src/SexyAppFramework/Buffer.cpp b/src/SexyAppFramework/Buffer.cpp index 6460035..d8e7a94 100644 --- a/src/SexyAppFramework/Buffer.cpp +++ b/src/SexyAppFramework/Buffer.cpp @@ -8,7 +8,7 @@ static unsigned long crc_table[256]; using namespace Sexy; -static char *gWebEncodeMap = ".-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; +static const char *gWebEncodeMap = ".-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; static int gWebDecodeMap[256] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, @@ -205,17 +205,15 @@ bool Buffer::ToUTF8String(std::string *theString) const { // UTF-8 BOM: strip it *theString = std::string(aData + 3, aLen - 3); - return true; } else { // no BOM: just copy as-is *theString = std::string(aData, aLen); } - - return false; -} + return true; +} void Buffer::FromWebString(const std::string &theString) {