secureswitools/swianalysistoolkit/source/common/streamreader.cpp
branchRCL_3
changeset 26 8b7f4e561641
parent 25 7333d7932ef7
equal deleted inserted replaced
25:7333d7932ef7 26:8b7f4e561641
   223 	int targetLength = 2 * aSrcLength;
   223 	int targetLength = 2 * aSrcLength;
   224 	int totalSize = targetLength + 1;
   224 	int totalSize = targetLength + 1;
   225 	// This memory will be freed by the caller of this function
   225 	// This memory will be freed by the caller of this function
   226 	char *ptrUtf8 = new char[targetLength + 1];
   226 	char *ptrUtf8 = new char[targetLength + 1];
   227 	
   227 	
   228 	UTF16* sourceStart = reinterpret_cast<UTF16*>(aSource);
   228 	UTF16* sourceStart = static_cast<UTF16*>(aSource);
   229 	UTF16* sourceEnd = sourceStart + aSrcLength; 
   229 	UTF16* sourceEnd = sourceStart + aSrcLength; 
   230 	UTF8* targetStart = reinterpret_cast<UTF8*>(ptrUtf8);
   230 	UTF8* targetStart = reinterpret_cast<UTF8*>(ptrUtf8);
   231 	UTF8* targetEnd;
   231 	UTF8* targetEnd;
   232 	
   232 	
   233 	ConversionResult result = ok;
   233 	ConversionResult result = ok;