From: <ag...@us...> - 2011-12-14 20:41:16
|
Revision: 2638 http://zoolib.svn.sourceforge.net/zoolib/?rev=2638&view=rev Author: agreen Date: 2011-12-14 20:41:10 +0000 (Wed, 14 Dec 2011) Log Message: ----------- Disable MSVC warning only for the code that it affects. Modified Paths: -------------- trunk/zoolib/source/cxx/zoolib/ZCtorDtor.h Modified: trunk/zoolib/source/cxx/zoolib/ZCtorDtor.h =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZCtorDtor.h 2011-12-08 08:26:42 UTC (rev 2637) +++ trunk/zoolib/source/cxx/zoolib/ZCtorDtor.h 2011-12-14 20:41:10 UTC (rev 2638) @@ -32,10 +32,17 @@ inline T* sCtor_T(void* oBytes) { #if ZCONFIG(Compiler,MSVC) + // We *want* POD types to be default initialized. + #pragma warning(push) #pragma warning(disable:4345) - // We *want* POD types to be default initialized. #endif + new(oBytes) T(); + +#if ZCONFIG(Compiler,MSVC) + #pragma warning(pop) +#endif + return static_cast<T*>(oBytes); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |