summaryrefslogtreecommitdiff
path: root/cppe/src/IceE/StringConverter.cpp
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2006-06-14 15:42:33 +0000
committerBernard Normier <bernard@zeroc.com>2006-06-14 15:42:33 +0000
commit983775d2c76d289de2721ee54771dc7fdd5bcf79 (patch)
tree81aaa7c7bd3d59ea315abf6e1029f147c0c82869 /cppe/src/IceE/StringConverter.cpp
parentminor code harness changes. (diff)
downloadice-983775d2c76d289de2721ee54771dc7fdd5bcf79.tar.bz2
ice-983775d2c76d289de2721ee54771dc7fdd5bcf79.tar.xz
ice-983775d2c76d289de2721ee54771dc7fdd5bcf79.zip
Removed fromUTF8/freeTarget
Diffstat (limited to 'cppe/src/IceE/StringConverter.cpp')
-rwxr-xr-xcppe/src/IceE/StringConverter.cpp43
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 =