0024574: ICC compiler warnings on Windows

NCollection_UtfString and NCollection_UtfIterator classes are refactored to use methods overloading instead of switches to dispatch implementation depending on character (Unicode code unit) size.

ICC-specific preprocessor directives are added to avoid warnings.
Unused local functions and variables, class methods, unreachable statements, and extra throw() declarations reported by ICC are removed.
Usage of "expl" for name of local variable is avoided as it conflicts with standard C function "expl" defined in math.h as preprocessor macro.

Non-standard (MS-specific) argument envp is removed in definition of main() function on Windows.
Functions _main_ and _WinMain_ are renamed to Draw_Main and Draw_WinMain, respectively, to avoid using names reserved in C++.

Doxygen warning is fixed in XDE User's Guide.
This commit is contained in:
abv
2017-10-19 17:12:05 +03:00
committed by bugmaster
parent f6c2b39aac
commit cf0786daf1
22 changed files with 259 additions and 298 deletions
@@ -317,35 +317,3 @@ Standard_Utf32Char* NCollection_UtfIterator<Type>::GetUtf32 (Standard_Utf32Char*
*theBuffer++ = myCharUtf32;
return theBuffer;
}
// =======================================================================
// function : AdvanceBytesUtf
// purpose :
// =======================================================================
template<typename Type> template<typename TypeWrite> inline
Standard_Integer NCollection_UtfIterator<Type>::AdvanceBytesUtf() const
{
switch (sizeof(TypeWrite))
{
case sizeof(Standard_Utf8Char): return AdvanceBytesUtf8();
case sizeof(Standard_Utf16Char): return AdvanceBytesUtf16();
case sizeof(Standard_Utf32Char): return AdvanceBytesUtf32();
default: return 0; // invalid case
}
}
// =======================================================================
// function : GetUtf
// purpose :
// =======================================================================
template<typename Type> template<typename TypeWrite> inline
TypeWrite* NCollection_UtfIterator<Type>::GetUtf (TypeWrite* theBuffer) const
{
switch (sizeof(TypeWrite))
{
case sizeof(Standard_Utf8Char): return (TypeWrite* )GetUtf8 ((Standard_Utf8UChar* )theBuffer);
case sizeof(Standard_Utf16Char): return (TypeWrite* )GetUtf16((Standard_Utf16Char* )theBuffer);
case sizeof(Standard_Utf32Char): return (TypeWrite* )GetUtf32((Standard_Utf32Char* )theBuffer);
default: return NULL; // invalid case
}
}