diff options
author | Bernard Normier <bernard@zeroc.com> | 2006-06-14 15:42:33 +0000 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2006-06-14 15:42:33 +0000 |
commit | 983775d2c76d289de2721ee54771dc7fdd5bcf79 (patch) | |
tree | 81aaa7c7bd3d59ea315abf6e1029f147c0c82869 /cppe/src/IceE/StringConverter.cpp | |
parent | minor code harness changes. (diff) | |
download | ice-983775d2c76d289de2721ee54771dc7fdd5bcf79.tar.bz2 ice-983775d2c76d289de2721ee54771dc7fdd5bcf79.tar.xz ice-983775d2c76d289de2721ee54771dc7fdd5bcf79.zip |
Removed fromUTF8/freeTarget
Diffstat (limited to 'cppe/src/IceE/StringConverter.cpp')
-rwxr-xr-x | cppe/src/IceE/StringConverter.cpp | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/cppe/src/IceE/StringConverter.cpp b/cppe/src/IceE/StringConverter.cpp index f715cdc564e..ef3daa57dd9 100755 --- a/cppe/src/IceE/StringConverter.cpp +++ b/cppe/src/IceE/StringConverter.cpp @@ -61,49 +61,6 @@ UnicodeWstringConverter::toUTF8(const wchar_t* sourceStart, void UnicodeWstringConverter::fromUTF8(const Byte* sourceStart, const Byte* sourceEnd, - const wchar_t*& targetStart, const wchar_t*& targetEnd) const -{ - size_t size = static_cast<size_t>(sourceEnd - sourceStart); - - wchar_t* outBuf = new wchar_t[size]; - wchar_t* tStart = outBuf; - - ConversionResult result = convertUTF8ToUTFWstring( - sourceStart, sourceEnd, tStart, outBuf + size, - lenientConversion); - - switch(result) - { - case conversionOK: - { - targetStart = outBuf; - targetEnd = tStart; - break; - } - case sourceExhausted: - throw StringConversionException(__FILE__, __LINE__, "UTF-8 string source exhausted"); - case sourceIllegal: - throw StringConversionException(__FILE__, __LINE__, "UTF-8 string source illegal"); - default: - { - assert(0); - throw StringConversionException(__FILE__, __LINE__); - } - } -} - -void -UnicodeWstringConverter::freeTarget(const wchar_t* targetStart) const -{ -#if defined(_MSC_VER) && _MSC_VER < 1300 - delete[] const_cast<wchar_t*>(targetStart); -#else - delete[] targetStart; -#endif -} - -void -UnicodeWstringConverter::fromUTF8(const Byte* sourceStart, const Byte* sourceEnd, wstring& target) const { ConversionResult result = |