cdbext: Fix msvc warnings

Change-Id: Ib1604c2e36d2a4dbfb7edccb5be0e4c401b026c5
Reviewed-by: Friedemann Kleint
This commit is contained in:
Kai Koehne
2011-05-18 15:10:43 +02:00
parent f4c818a59e
commit 21cfa5c6cc

View File

@@ -30,6 +30,9 @@
**
**************************************************************************/
// std::copy is perfectly fine, don't let MSVC complain about it being deprecated
#pragma warning (disable: 4996)
#include "symbolgroupvalue.h"
#include "symbolgroup.h"
#include "stringutils.h"
@@ -2312,6 +2315,7 @@ AssignmentStringData AssignmentStringData::decodeString(const char *begin, const
const unsigned char *source = reinterpret_cast<const unsigned char *>(begin);
unsigned short *target = reinterpret_cast<unsigned short *>(result.data);
std::copy(source, source + stringLength, target);
return result;
} // toUtf16
switch (valueEncoding) {
@@ -2457,7 +2461,7 @@ static inline int assignStdStringI(SymbolGroupNode *n, int type,
}
if (reserved < 0 || !size || !bx)
return 42;
if (reserved <= data.stringLength)
if (reserved <= (int)data.stringLength)
return 1; // Insufficient memory.
// Copy data: 'Buf' array for small strings, else pointer 'Ptr'.
const int bufSize = type == KT_StdString ? 16 : 8; // see basic_string.