EgtGraphics :
- aggiunto ( nothrow) a tutte le new.
This commit is contained in:
@@ -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 ;
|
||||
}
|
||||
|
||||
+1
-2
@@ -20,12 +20,11 @@
|
||||
|
||||
using namespace std ;
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
ISceExecutor*
|
||||
CreateSceExecutor( void)
|
||||
{
|
||||
return static_cast<ISceExecutor*> ( new SceExecutor) ;
|
||||
return static_cast<ISceExecutor*> ( new( nothrow) SceExecutor) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
+3
-3
@@ -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) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user