PdfString::ConvertUTF8toUTF16 has this sequence of code with a comment from
'RG' about compiler complaining about unreachable code:
} else if (ch > UNI_MAX_UTF16) {
if (eConversion == ePdfStringConversion_Strict) {
PODOFO_RAISE_ERROR( ePdfError_InvalidDataType );
//RG: TODO My compiler says that this is unreachable code!
source -= (extraBytesToRead+1); /* return to the start */
break; /* Bail out; shouldn't continue */
} else {
*target++ = UNI_REPLACEMENT_CHAR;
}
} else {
It only is because PODOFO_RAISE_ERROR is actually "throw ::PoDoFo::PdfError".
The code after that is actually unreachable, because of the throw. I haven't
yet get deeper to understand what was the real intent here. If someone is
familiar with that method implementation, he/she'll know what to do right.
--
Best Regards, Meilleures salutations, Met vriendelijke groeten,
Olivier Mascia
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Podofo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/podofo-users