From: stephan b. <sg...@us...> - 2004-12-28 15:55:36
|
Update of /cvsroot/pclasses/pclasses2/src/System In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2912/src/System Modified Files: SharedLib.common.cpp Log Message: Added a cast (const char *) 0, to avoid a potential warning from some compilers about 0 being castable to lots of types. Index: SharedLib.common.cpp =================================================================== RCS file: /cvsroot/pclasses/pclasses2/src/System/SharedLib.common.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- SharedLib.common.cpp 28 Dec 2004 15:11:18 -0000 1.1 +++ SharedLib.common.cpp 28 Dec 2004 15:55:16 -0000 1.2 @@ -11,7 +11,7 @@ void* SharedLib::operator[](const std::string& symbol) throw(RuntimeError) { - return operator[](symbol.empty() ? 0 : symbol.c_str()); + return operator[](symbol.empty() ? (const char *)0 : symbol.c_str()); // ^^^ the 0 is to force operator[const char*] to throw a // runtime error. We don't throw it here because we want to // inherit the platform-specific op[char*]'s throw behaviour. |