diff options
author | Igor Pavlov <ipavlov@users.sourceforge.net> | 2009-12-14 03:00:00 +0300 |
---|---|---|
committer | Kornel LesiĆski <kornel@geekhood.net> | 2016-05-28 02:16:01 +0300 |
commit | 1fbaf0aac5000ca563a1ee2bb15ba6821a08e468 (patch) | |
tree | ec079944edffd096355ecb0c499f889364aefb4b /CPP/Common | |
parent | 2fed8721946901375d21d4a506fe8b114045b397 (diff) |
9.09 beta
Diffstat (limited to 'CPP/Common')
-rwxr-xr-x | CPP/Common/MyVector.cpp | 6 | ||||
-rwxr-xr-x | CPP/Common/UTFConvert.cpp | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/CPP/Common/MyVector.cpp b/CPP/Common/MyVector.cpp index 88d9993a..3b531768 100755 --- a/CPP/Common/MyVector.cpp +++ b/CPP/Common/MyVector.cpp @@ -25,12 +25,12 @@ void CBaseRecordVector::ReserveOnePosition() { if (_size != _capacity) return; - int delta = 1; + unsigned delta = 1; if (_capacity >= 64) - delta = _capacity / 4; + delta = (unsigned)_capacity / 4; else if (_capacity >= 8) delta = 8; - Reserve(_capacity + delta); + Reserve(_capacity + (int)delta); } void CBaseRecordVector::Reserve(int newCapacity) diff --git a/CPP/Common/UTFConvert.cpp b/CPP/Common/UTFConvert.cpp index 9d1fd005..95362430 100755 --- a/CPP/Common/UTFConvert.cpp +++ b/CPP/Common/UTFConvert.cpp @@ -99,7 +99,7 @@ static Bool Utf16_To_Utf8(char *dest, size_t *destLen, const wchar_t *src, size_ c2 = src[srcPos++]; if (c2 < 0xDC00 || c2 >= 0xE000) break; - value = ((value - 0xD800) << 10) | (c2 - 0xDC00); + value = (((value - 0xD800) << 10) | (c2 - 0xDC00)) + 0x10000; } for (numAdds = 1; numAdds < 5; numAdds++) if (value < (((UInt32)1) << (numAdds * 5 + 6))) |