diff --git a/ObjMultiGraphics.cpp b/ObjMultiGraphics.cpp index 5a91a4e..f531e28 100644 --- a/ObjMultiGraphics.cpp +++ b/ObjMultiGraphics.cpp @@ -17,6 +17,8 @@ #include "ObjNewGraphics.h" #include "ObjOldGraphics.h" +using namespace std ; + //---------------------------------------------------------------------------- ObjMultiGraphics::~ObjMultiGraphics( void) { @@ -194,9 +196,9 @@ ObjMultiGraphics::ObjMultiGraphics( int nCount, bool bNewWay) m_vOEGR.reserve( nCount) ; for ( int i = 0 ; i < nCount ; ++ i) { if ( bNewWay) - m_vOEGR.emplace_back( new ObjNewGraphics) ; + m_vOEGR.emplace_back( new( nothrow) ObjNewGraphics) ; else - m_vOEGR.emplace_back( new ObjOldGraphics) ; + m_vOEGR.emplace_back( new( nothrow) ObjOldGraphics) ; } m_nCurr = - 1 ; } diff --git a/SceExecutor.cpp b/SceExecutor.cpp index c56646b..487dace 100644 --- a/SceExecutor.cpp +++ b/SceExecutor.cpp @@ -20,12 +20,11 @@ using namespace std ; - //---------------------------------------------------------------------------- ISceExecutor* CreateSceExecutor( void) { - return static_cast ( new SceExecutor) ; + return static_cast ( new( nothrow) SceExecutor) ; } //---------------------------------------------------------------------------- diff --git a/SceneGeom.cpp b/SceneGeom.cpp index 2c2559a..af9c251 100644 --- a/SceneGeom.cpp +++ b/SceneGeom.cpp @@ -668,11 +668,11 @@ static ObjEGrGraphics* CreateObjEGrGraphics( int nCount, bool bNewWay) { if ( nCount > 1) - return ( new ObjMultiGraphics( nCount, bNewWay)) ; + return ( new( nothrow) ObjMultiGraphics( nCount, bNewWay)) ; else if ( bNewWay) - return ( new ObjNewGraphics) ; + return ( new( nothrow) ObjNewGraphics) ; else - return ( new ObjOldGraphics) ; + return ( new( nothrow) ObjOldGraphics) ; } //----------------------------------------------------------------------------