diff --git a/src/Actor.cpp b/src/Actor.cpp index 89cf103a42..93115e06d8 100644 --- a/src/Actor.cpp +++ b/src/Actor.cpp @@ -38,7 +38,7 @@ vector Actor::g_vfCurrentBGMBeatPlayer(NUM_PlayerNumber, 0); vector Actor::g_vfCurrentBGMBeatPlayerNoOffset(NUM_PlayerNumber, 0); -Actor *Actor::Copy() const { return smnew Actor(*this); } +Actor *Actor::Copy() const { return new Actor(*this); } static float g_fCabinetLights[NUM_CabinetLight]; @@ -149,7 +149,7 @@ static bool GetMessageNameFromCommandName( const RString &sCommandName, RString Actor::Actor() { - m_pLuaInstance = smnew LuaClass; + m_pLuaInstance = new LuaClass; Lua *L = LUA->Get(); m_pLuaInstance->PushSelf( L ); lua_newtable( L ); @@ -192,7 +192,7 @@ Actor::Actor( const Actor &cpy ): CPY( m_current ); CPY( m_start ); for( unsigned i = 0; i < cpy.m_Tweens.size(); ++i ) - m_Tweens.push_back( smnew TweenStateAndInfo(*cpy.m_Tweens[i]) ); + m_Tweens.push_back( new TweenStateAndInfo(*cpy.m_Tweens[i]) ); CPY( m_bFirstUpdate ); @@ -260,7 +260,7 @@ void Actor::LoadFromNode( const XNode* pNode ) else if( sKeyName == "BaseZoomZ" ) SetBaseZoomZ( pValue->GetValue() ); else if( EndsWith(sKeyName,"Command") ) { - LuaReference *pRef = smnew LuaReference; + LuaReference *pRef = new LuaReference; pValue->PushValue( L ); pRef->SetFromStack( L ); RString sCmdName = sKeyName.Left( sKeyName.size()-7 ); @@ -762,7 +762,7 @@ void Actor::BeginTweening( float time, ITween *pTween ) } // add a new TweenState to the tail, and initialize it - m_Tweens.push_back( smnew TweenStateAndInfo ); + m_Tweens.push_back( new TweenStateAndInfo ); // latest TweenState &TS = m_Tweens.back()->state; @@ -1474,7 +1474,7 @@ public: static int queuemessage( T* p, lua_State *L ) { p->QueueMessage(SArg(1)); return 0; } static int addcommand( T* p, lua_State *L ) { - LuaReference *pRef = smnew LuaReference; + LuaReference *pRef = new LuaReference; pRef->SetFromStack( L ); p->AddCommand( SArg(1), apActorCommands(pRef) ); return 0; diff --git a/src/ActorFrame.cpp b/src/ActorFrame.cpp index 112e5f1f1f..7aabc238d2 100644 --- a/src/ActorFrame.cpp +++ b/src/ActorFrame.cpp @@ -18,7 +18,7 @@ */ //REGISTER_ACTOR_CLASS( ActorFrame ); REGISTER_ACTOR_CLASS_WITH_NAME( ActorFrameAutoDeleteChildren, ActorFrame ); -ActorFrame *ActorFrame::Copy() const { return smnew ActorFrame(*this); } +ActorFrame *ActorFrame::Copy() const { return new ActorFrame(*this); } ActorFrame::ActorFrame() diff --git a/src/ActorFrameTexture.cpp b/src/ActorFrameTexture.cpp index b0e824d7f9..6e70ac4190 100644 --- a/src/ActorFrameTexture.cpp +++ b/src/ActorFrameTexture.cpp @@ -5,7 +5,7 @@ #include "ActorUtil.h" REGISTER_ACTOR_CLASS_WITH_NAME( ActorFrameTextureAutoDeleteChildren, ActorFrameTexture ); -ActorFrameTexture *ActorFrameTexture::Copy() const { return smnew ActorFrameTexture(*this); } +ActorFrameTexture *ActorFrameTexture::Copy() const { return new ActorFrameTexture(*this); } ActorFrameTexture::ActorFrameTexture() { @@ -44,7 +44,7 @@ void ActorFrameTexture::Create() param.bFloat = m_bFloat; param.iWidth = (int) m_size.x; param.iHeight = (int) m_size.y; - m_pRenderTarget = smnew RageTextureRenderTarget( id, param ); + m_pRenderTarget = new RageTextureRenderTarget( id, param ); m_pRenderTarget->m_bWasUsed = true; /* This passes ownership of m_pRenderTarget to TEXTUREMAN, but we retain diff --git a/src/ActorScroller.cpp b/src/ActorScroller.cpp index 099e0f141a..e463af73b3 100644 --- a/src/ActorScroller.cpp +++ b/src/ActorScroller.cpp @@ -14,7 +14,7 @@ * that string instead create an ActorFrameAutoDeleteChildren object. */ //REGISTER_ACTOR_CLASS( ActorScroller ); REGISTER_ACTOR_CLASS_WITH_NAME( ActorScrollerAutoDeleteChildren, ActorScroller ); -ActorScroller *ActorScroller::Copy() const { return smnew ActorScroller(*this); } +ActorScroller *ActorScroller::Copy() const { return new ActorScroller(*this); } ActorScroller::ActorScroller() diff --git a/src/ActorUtil.cpp b/src/ActorUtil.cpp index 7ea333d5d5..aaa16fe7f1 100644 --- a/src/ActorUtil.cpp +++ b/src/ActorUtil.cpp @@ -132,7 +132,7 @@ Actor* ActorUtil::LoadFromNode( const XNode* pNode, Actor *pParentActor ) RString sError = ssprintf( "%s: invalid Class \"%s\"", ActorUtil::GetWhere(pNode).c_str(), sClass.c_str() ); Dialog::OK( sError ); - return smnew Actor; // Return a dummy object so that we don't crash in AutoActor later. + return new Actor; // Return a dummy object so that we don't crash in AutoActor later. } const CreateActorFn &pfn = iter->second; @@ -220,7 +220,7 @@ Actor* ActorUtil::MakeActor( const RString &sPath_, Actor *pParentActor ) if( pNode.get() == NULL ) { // XNode will warn about the error - return smnew Actor; + return new Actor; } Actor *pRet = ActorUtil::LoadFromNode( pNode.get(), pParentActor ); @@ -310,7 +310,7 @@ apActorCommands ActorUtil::ParseActorCommands( const RString &sCommands, const R { Lua *L = LUA->Get(); LuaHelpers::ParseCommandList( L, sCommands, sName ); - LuaReference *pRet = smnew LuaReference; + LuaReference *pRet = new LuaReference; pRet->SetFromStack( L ); LUA->Release( L ); diff --git a/src/ActorUtil.h b/src/ActorUtil.h index 8000ab8359..1be071be39 100644 --- a/src/ActorUtil.h +++ b/src/ActorUtil.h @@ -9,7 +9,7 @@ class XNode; typedef Actor* (*CreateActorFn)(); template -Actor *CreateActor() { return smnew T; } +Actor *CreateActor() { return new T; } /** * @brief Register the requested Actor with the specified external name. @@ -19,7 +19,7 @@ Actor *CreateActor() { return smnew T; } struct Register##className { \ Register##className() { ActorUtil::Register(#externalClassName, CreateActor); } \ }; \ - className *className::Copy() const { return smnew className(*this); } \ + className *className::Copy() const { return new className(*this); } \ static Register##className register##className /** diff --git a/src/AutoActor.cpp b/src/AutoActor.cpp index 932443a570..26fdb4757f 100644 --- a/src/AutoActor.cpp +++ b/src/AutoActor.cpp @@ -42,7 +42,7 @@ void AutoActor::Load( const RString &sPath ) // If a Condition is false, MakeActor will return NULL. if( m_pActor == NULL ) - m_pActor = smnew Actor; + m_pActor = new Actor; } void AutoActor::LoadB( const RString &sMetricsGroup, const RString &sElement ) diff --git a/src/AutoKeysounds.cpp b/src/AutoKeysounds.cpp index c0d1edc260..e7fcf31f2b 100644 --- a/src/AutoKeysounds.cpp +++ b/src/AutoKeysounds.cpp @@ -154,13 +154,13 @@ void AutoKeysounds::LoadTracks( const Song *pSong, RageSoundReader *&pShared, Ra RageSoundReader *pSongReader = vpSounds[0]; // Load the buffering filter before the effects filters, so effects aren't delayed. - pSongReader = smnew RageSoundReader_Extend( pSongReader ); - pSongReader = smnew RageSoundReader_ThreadedBuffer( pSongReader ); + pSongReader = new RageSoundReader_Extend( pSongReader ); + pSongReader = new RageSoundReader_ThreadedBuffer( pSongReader ); pShared = pSongReader; } else if( !vpSounds.empty() ) { - RageSoundReader_Merge *pMerge = smnew RageSoundReader_Merge; + RageSoundReader_Merge *pMerge = new RageSoundReader_Merge; FOREACH( RageSoundReader *, vpSounds, so ) pMerge->AddSound( *so ); @@ -169,8 +169,8 @@ void AutoKeysounds::LoadTracks( const Song *pSong, RageSoundReader *&pShared, Ra RageSoundReader *pSongReader = pMerge; // Load the buffering filter before the effects filters, so effects aren't delayed. - pSongReader = smnew RageSoundReader_Extend( pSongReader ); - pSongReader = smnew RageSoundReader_ThreadedBuffer( pSongReader ); + pSongReader = new RageSoundReader_Extend( pSongReader ); + pSongReader = new RageSoundReader_ThreadedBuffer( pSongReader ); pShared = pSongReader; } @@ -180,8 +180,8 @@ void AutoKeysounds::LoadTracks( const Song *pSong, RageSoundReader *&pShared, Ra RString sError; RageSoundReader *pGuitarTrackReader = RageSoundReader_FileReader::OpenFile( pSong->GetInstrumentTrackPath(InstrumentTrack_Guitar), sError ); // Load the buffering filter before the effects filters, so effects aren't delayed. - pGuitarTrackReader = smnew RageSoundReader_Extend( pGuitarTrackReader ); - pGuitarTrackReader = smnew RageSoundReader_ThreadedBuffer( pGuitarTrackReader ); + pGuitarTrackReader = new RageSoundReader_Extend( pGuitarTrackReader ); + pGuitarTrackReader = new RageSoundReader_ThreadedBuffer( pGuitarTrackReader ); pPlayer1 = pGuitarTrackReader; } @@ -259,7 +259,7 @@ void AutoKeysounds::FinishLoading() // Load autoplay sounds, if any. { - RageSoundReader_Chain *pChain = smnew RageSoundReader_Chain; + RageSoundReader_Chain *pChain = new RageSoundReader_Chain; pChain->SetPreferredSampleRate( SOUNDMAN->GetDriverSampleRate() ); LoadAutoplaySoundsInto( pChain ); @@ -271,7 +271,7 @@ void AutoKeysounds::FinishLoading() pChain->AddSound( iIndex, 0.0f, 0 ); } pChain->Finish(); - m_pSharedSound = smnew RageSoundReader_Extend(pChain); + m_pSharedSound = new RageSoundReader_Extend(pChain); } else { @@ -280,24 +280,24 @@ void AutoKeysounds::FinishLoading() } ASSERT_M( m_pSharedSound != NULL, ssprintf("No keysounds were loaded for the song %s!", pSong->m_sMainTitle.c_str() )); - m_pSharedSound = smnew RageSoundReader_PitchChange( m_pSharedSound ); - m_pSharedSound = smnew RageSoundReader_PostBuffering( m_pSharedSound ); - m_pSharedSound = smnew RageSoundReader_Pan( m_pSharedSound ); + m_pSharedSound = new RageSoundReader_PitchChange( m_pSharedSound ); + m_pSharedSound = new RageSoundReader_PostBuffering( m_pSharedSound ); + m_pSharedSound = new RageSoundReader_Pan( m_pSharedSound ); apSounds.push_back( m_pSharedSound ); if( m_pPlayerSounds[0] != NULL ) { - m_pPlayerSounds[0] = smnew RageSoundReader_PitchChange( m_pPlayerSounds[0] ); - m_pPlayerSounds[0] = smnew RageSoundReader_PostBuffering( m_pPlayerSounds[0] ); - m_pPlayerSounds[0] = smnew RageSoundReader_Pan( m_pPlayerSounds[0] ); + m_pPlayerSounds[0] = new RageSoundReader_PitchChange( m_pPlayerSounds[0] ); + m_pPlayerSounds[0] = new RageSoundReader_PostBuffering( m_pPlayerSounds[0] ); + m_pPlayerSounds[0] = new RageSoundReader_Pan( m_pPlayerSounds[0] ); apSounds.push_back( m_pPlayerSounds[0] ); } if( m_pPlayerSounds[1] != NULL ) { - m_pPlayerSounds[1] = smnew RageSoundReader_PitchChange( m_pPlayerSounds[1] ); - m_pPlayerSounds[1] = smnew RageSoundReader_PostBuffering( m_pPlayerSounds[1] ); - m_pPlayerSounds[1] = smnew RageSoundReader_Pan( m_pPlayerSounds[1] ); + m_pPlayerSounds[1] = new RageSoundReader_PitchChange( m_pPlayerSounds[1] ); + m_pPlayerSounds[1] = new RageSoundReader_PostBuffering( m_pPlayerSounds[1] ); + m_pPlayerSounds[1] = new RageSoundReader_Pan( m_pPlayerSounds[1] ); apSounds.push_back( m_pPlayerSounds[1] ); } @@ -306,7 +306,7 @@ void AutoKeysounds::FinishLoading() if( apSounds.size() > 1 ) { - RageSoundReader_Merge *pMerge = smnew RageSoundReader_Merge; + RageSoundReader_Merge *pMerge = new RageSoundReader_Merge; FOREACH( RageSoundReader *, apSounds, ps ) pMerge->AddSound( *ps ); diff --git a/src/BGAnimation.cpp b/src/BGAnimation.cpp index baeba3a787..66530cc350 100644 --- a/src/BGAnimation.cpp +++ b/src/BGAnimation.cpp @@ -78,7 +78,7 @@ void BGAnimation::AddLayersFromAniDir( const RString &_sAniDir, const XNode *pNo else { // import as a single layer - BGAnimationLayer* bgLayer = smnew BGAnimationLayer; + BGAnimationLayer* bgLayer = new BGAnimationLayer; bgLayer->LoadFromNode( pKey ); this->AddChild( bgLayer ); } @@ -149,7 +149,7 @@ void BGAnimation::LoadFromAniDir( const RString &_sAniDir ) const RString sPath = asImagePaths[i]; if( Basename(sPath).Left(1) == "_" ) continue; // don't directly load files starting with an underscore - BGAnimationLayer* pLayer = smnew BGAnimationLayer; + BGAnimationLayer* pLayer = new BGAnimationLayer; pLayer->LoadFromAniLayerFile( asImagePaths[i] ); AddChild( pLayer ); } @@ -169,7 +169,7 @@ void BGAnimation::LoadFromNode( const XNode* pNode ) float fLengthSeconds = 0; if( pNode->GetAttrValue( "LengthSeconds", fLengthSeconds ) ) { - Actor *pActor = smnew Actor; + Actor *pActor = new Actor; pActor->SetName( "BGAnimation dummy" ); pActor->SetVisible( false ); apActorCommands ap = ActorUtil::ParseActorCommands( ssprintf("sleep,%f",fLengthSeconds) ); diff --git a/src/BGAnimationLayer.cpp b/src/BGAnimationLayer.cpp index 6d60a7a894..d65e9ae3fc 100644 --- a/src/BGAnimationLayer.cpp +++ b/src/BGAnimationLayer.cpp @@ -86,7 +86,7 @@ void BGAnimationLayer::LoadFromAniLayerFile( const RString& sPath ) else sSongBGPath = THEME->GetPathG("Common","fallback background"); - Sprite* pSprite = smnew Sprite; + Sprite* pSprite = new Sprite; pSprite->Load( Sprite::SongBGTexture(sSongBGPath) ); pSprite->StretchTo( FullScreenRectF ); this->AddChild( pSprite ); @@ -163,7 +163,7 @@ void BGAnimationLayer::LoadFromAniLayerFile( const RString& sPath ) case EFFECT_CENTER: { m_Type = TYPE_SPRITE; - Sprite* pSprite = smnew Sprite; + Sprite* pSprite = new Sprite; this->AddChild( pSprite ); pSprite->Load( sPath ); pSprite->SetXY( SCREEN_CENTER_X, SCREEN_CENTER_Y ); @@ -179,7 +179,7 @@ void BGAnimationLayer::LoadFromAniLayerFile( const RString& sPath ) case EFFECT_STRETCH_TWIST: { m_Type = TYPE_SPRITE; - Sprite* pSprite = smnew Sprite; + Sprite* pSprite = new Sprite; this->AddChild( pSprite ); RageTextureID ID(sPath); ID.bStretch = true; @@ -200,7 +200,7 @@ void BGAnimationLayer::LoadFromAniLayerFile( const RString& sPath ) case EFFECT_STRETCH_SPIN: { m_Type = TYPE_SPRITE; - Sprite* pSprite = smnew Sprite; + Sprite* pSprite = new Sprite; this->AddChild( pSprite ); pSprite->Load( Sprite::SongBGTexture(sPath) ); const RectF StretchedFullScreenRectF( @@ -231,7 +231,7 @@ void BGAnimationLayer::LoadFromAniLayerFile( const RString& sPath ) for( int i=0; iAddChild( pSprite ); pSprite->Load( sPath ); pSprite->SetZoom( 0.7f + 0.6f*i/(float)iNumParticles ); @@ -303,7 +303,7 @@ void BGAnimationLayer::LoadFromAniLayerFile( const RString& sPath ) { for( int y=0; yAddChild( pSprite ); pSprite->Load( ID ); pSprite->SetTextureWrapping( true ); // gets rid of some "cracks" diff --git a/src/Background.cpp b/src/Background.cpp index 64f6172b5b..e077454f31 100644 --- a/src/Background.cpp +++ b/src/Background.cpp @@ -211,7 +211,7 @@ void BackgroundImpl::Init() } if( bOneOrMoreChars && !bShowingBeginnerHelper && SHOW_DANCING_CHARACTERS ) - m_pDancingCharacters = smnew DancingCharacters; + m_pDancingCharacters = new DancingCharacters; RageColor c = GetBrightnessColor(0); @@ -318,7 +318,7 @@ bool BackgroundImpl::Layer::CreateBackground( const Song *pSong, const Backgroun ASSERT( !sResolved.empty() ); - vsResolvedRef[i] = smnew LuaThreadVariable( ssprintf("File%d",i+1), sResolved ); + vsResolvedRef[i] = new LuaThreadVariable( ssprintf("File%d",i+1), sResolved ); } RString sEffect = bd.m_sEffect; @@ -947,7 +947,7 @@ void BrightnessOverlay::FadeToActualBrightness() SetActualBrightness(); } -Background::Background() { m_pImpl = smnew BackgroundImpl; this->AddChild(m_pImpl); } +Background::Background() { m_pImpl = new BackgroundImpl; this->AddChild(m_pImpl); } Background::~Background() { SAFE_DELETE( m_pImpl ); } void Background::Init() { m_pImpl->Init(); } void Background::LoadFromSong( const Song *pSong ) { m_pImpl->LoadFromSong(pSong); } diff --git a/src/BackgroundUtil.cpp b/src/BackgroundUtil.cpp index a8ddde7555..67565824c5 100644 --- a/src/BackgroundUtil.cpp +++ b/src/BackgroundUtil.cpp @@ -33,7 +33,7 @@ bool BackgroundDef::operator==( const BackgroundDef &other ) const XNode *BackgroundDef::CreateNode() const { - XNode* pNode = smnew XNode( "BackgroundDef" ); + XNode* pNode = new XNode( "BackgroundDef" ); if( !m_sEffect.empty() ) pNode->AppendAttr( "Effect", m_sEffect ); diff --git a/src/BannerCache.cpp b/src/BannerCache.cpp index 7373590b5f..da1ae51c17 100644 --- a/src/BannerCache.cpp +++ b/src/BannerCache.cpp @@ -307,7 +307,7 @@ RageTextureID BannerCache::LoadCachedBanner( RString sBannerPath ) LOG->Trace( "Loading banner texture %s; src %ix%i; image %ix%i", ID.filename.c_str(), iSourceWidth, iSourceHeight, pImage->w, pImage->h ); - RageTexture *pTexture = smnew BannerTexture( ID, pImage, iSourceWidth, iSourceHeight ); + RageTexture *pTexture = new BannerTexture( ID, pImage, iSourceWidth, iSourceHeight ); ID.Policy = RageTextureID::TEX_VOLATILE; TEXTUREMAN->RegisterTexture( ID, pTexture ); diff --git a/src/BaseClasses/amfilter.cpp b/src/BaseClasses/amfilter.cpp index e700695a16..2865bc75d1 100644 --- a/src/BaseClasses/amfilter.cpp +++ b/src/BaseClasses/amfilter.cpp @@ -641,7 +641,7 @@ CBaseFilter::EnumPins(IEnumPins **ppEnum) /* Create a new ref counted enumerator */ - *ppEnum = smnew CEnumPins(this, + *ppEnum = new CEnumPins(this, NULL); return *ppEnum == NULL ? E_OUTOFMEMORY : NOERROR; @@ -733,7 +733,7 @@ CBaseFilter::JoinFilterGraph( if (pName) { DWORD nameLen = lstrlenW(pName)+1; - m_pName = smnew WCHAR[nameLen]; + m_pName = new WCHAR[nameLen]; if (m_pName) { CopyMemory(m_pName, pName, nameLen*sizeof(WCHAR)); } else { @@ -1026,7 +1026,7 @@ CEnumPins::Clone(IEnumPins **ppEnum) hr = VFW_E_ENUM_OUT_OF_SYNC; } else { - *ppEnum = smnew CEnumPins(m_pFilter, + *ppEnum = new CEnumPins(m_pFilter, this); if (*ppEnum == NULL) { hr = E_OUTOFMEMORY; @@ -1286,7 +1286,7 @@ CEnumMediaTypes::Clone(IEnumMediaTypes **ppEnum) hr = VFW_E_ENUM_OUT_OF_SYNC; } else { - *ppEnum = smnew CEnumMediaTypes(m_pPin, + *ppEnum = new CEnumMediaTypes(m_pPin, this); if (*ppEnum == NULL) { @@ -1478,7 +1478,7 @@ CBasePin::CBasePin(TCHAR *pObjectName, if (pName) { DWORD nameLen = lstrlenW(pName)+1; - m_pName = smnew WCHAR[nameLen]; + m_pName = new WCHAR[nameLen]; if (m_pName) { CopyMemory(m_pName, pName, nameLen*sizeof(WCHAR)); } @@ -1524,7 +1524,7 @@ CBasePin::CBasePin(CHAR *pObjectName, if (pName) { DWORD nameLen = lstrlenW(pName)+1; - m_pName = smnew WCHAR[nameLen]; + m_pName = new WCHAR[nameLen]; if (m_pName) { CopyMemory(m_pName, pName, nameLen*sizeof(WCHAR)); } @@ -2244,7 +2244,7 @@ CBasePin::EnumMediaTypes( /* Create a new ref counted enumerator */ - *ppEnum = smnew CEnumMediaTypes(this, + *ppEnum = new CEnumMediaTypes(this, NULL); if (*ppEnum == NULL) { @@ -4889,7 +4889,7 @@ CBaseAllocator::CSampleList::Remove(CMediaSample * pSample) /* This goes in the factory template table to create new instances */ CUnknown *CMemAllocator::CreateInstance(LPUNKNOWN pUnk, HRESULT *phr) { - CUnknown *pUnkRet = smnew CMemAllocator(NAME("CMemAllocator"), pUnk, phr); + CUnknown *pUnkRet = new CMemAllocator(NAME("CMemAllocator"), pUnk, phr); return pUnkRet; } @@ -5047,7 +5047,7 @@ CMemAllocator::Alloc(void) for (; m_lAllocated < m_lCount; m_lAllocated++, pNext += lAlignedSize) { - pSample = smnew CMediaSample( + pSample = new CMediaSample( NAME("Default memory media sample"), this, &hr, diff --git a/src/BaseClasses/combase.h b/src/BaseClasses/combase.h index 836136e30a..d6197e53f3 100644 --- a/src/BaseClasses/combase.h +++ b/src/BaseClasses/combase.h @@ -25,7 +25,7 @@ b. Make a static CreateInstance function that takes an LPUNKNOWN, an HRESULT * as we do not copy the string. To stop large amounts of memory being used in retail builds by all these static strings use the NAME macro, - CMyFilter = smnew CImplFilter(NAME("My filter"),pUnknown,phr); + CMyFilter = new CImplFilter(NAME("My filter"),pUnknown,phr); if (FAILED(hr)) { return hr; } diff --git a/src/BaseClasses/ctlutil.cpp b/src/BaseClasses/ctlutil.cpp index 99f3d9eb7b..8a98c83a08 100644 --- a/src/BaseClasses/ctlutil.cpp +++ b/src/BaseClasses/ctlutil.cpp @@ -1618,7 +1618,7 @@ CDispParams::CDispParams(UINT nArgs, VARIANT* pArgs, HRESULT *phr) { cArgs = nArgs; if(cArgs) { - rgvarg = smnew VARIANT[cArgs]; + rgvarg = new VARIANT[cArgs]; if(NULL == rgvarg) { cArgs = 0; if(phr) { @@ -1681,7 +1681,7 @@ CDispParams::CDispParams(UINT nArgs, VARIANT* pArgs, HRESULT *phr) { // the pointer points just after the WORD WORD len = * (WORD*) (pSrc->bstrVal - (sizeof(WORD) / sizeof(OLECHAR))); - OLECHAR* pch = smnew OLECHAR[len + (sizeof(WORD)/sizeof(OLECHAR))]; + OLECHAR* pch = new OLECHAR[len + (sizeof(WORD)/sizeof(OLECHAR))]; if(pch) { WORD *pui = (WORD*)pch; *pui = len; @@ -2041,7 +2041,7 @@ CCmdQueue::New( *ppCmd = NULL; CDeferredCommand* pCmd; - pCmd = smnew CDeferredCommand(this, + pCmd = new CDeferredCommand(this, NULL, // not aggregated &hr, pUnk, // this guy will execute diff --git a/src/BaseClasses/dllentry.cpp b/src/BaseClasses/dllentry.cpp index 52e8ae7831..6b74d2e524 100644 --- a/src/BaseClasses/dllentry.cpp +++ b/src/BaseClasses/dllentry.cpp @@ -194,7 +194,7 @@ DllGetClassObject( // found a template - make a class factory based on this // template - *pv = (LPVOID) (LPUNKNOWN) smnew CClassFactory(pT); + *pv = (LPVOID) (LPUNKNOWN) new CClassFactory(pT); if(*pv == NULL) { return E_OUTOFMEMORY; } diff --git a/src/BaseClasses/msgthrd.h b/src/BaseClasses/msgthrd.h index b73be8dccc..75ce5cd61d 100644 --- a/src/BaseClasses/msgthrd.h +++ b/src/BaseClasses/msgthrd.h @@ -101,7 +101,7 @@ public: void PutThreadMsg(UINT uMsg, DWORD dwMsgFlags, LPVOID lpMsgParam, CAMEvent *pEvent = NULL) { CAutoLock lck(&m_Lock); - CMsg* pMsg = smnew CMsg(uMsg, dwMsgFlags, lpMsgParam, pEvent); + CMsg* pMsg = new CMsg(uMsg, dwMsgFlags, lpMsgParam, pEvent); m_ThreadQueue.AddTail(pMsg); if (m_lWaiting != 0) { diff --git a/src/BaseClasses/outputq.cpp b/src/BaseClasses/outputq.cpp index c015dc38b4..d80d84f45e 100644 --- a/src/BaseClasses/outputq.cpp +++ b/src/BaseClasses/outputq.cpp @@ -92,7 +92,7 @@ COutputQueue::COutputQueue( // Create our sample batch - m_ppSamples = smnew PMEDIASAMPLE[m_lBatchSize]; + m_ppSamples = new PMEDIASAMPLE[m_lBatchSize]; if(m_ppSamples == NULL) { *phr = E_OUTOFMEMORY; return; @@ -108,7 +108,7 @@ COutputQueue::COutputQueue( *phr = AmHresultFromWin32(dwError); return; } - m_List = smnew CSampleList(NAME("Sample Queue List"), + m_List = new CSampleList(NAME("Sample Queue List"), lListSize, FALSE // No lock ); @@ -411,7 +411,7 @@ COutputQueue::NewSegment( // critical section) that the packet immediately following a // NEW_SEGMENT value is a NewSegmentPacket containing the // parameters. - NewSegmentPacket * ppack = smnew NewSegmentPacket; + NewSegmentPacket * ppack = new NewSegmentPacket; if(ppack == NULL) { return; } diff --git a/src/BaseClasses/refclock.cpp b/src/BaseClasses/refclock.cpp index 04c7d93469..2af26dfaee 100644 --- a/src/BaseClasses/refclock.cpp +++ b/src/BaseClasses/refclock.cpp @@ -55,7 +55,7 @@ CBaseReferenceClock::CBaseReferenceClock( TCHAR *pName, LPUNKNOWN pUnk, HRESULT , m_rtLastGotTime(0) , m_TimerResolution(0) , m_bAbort( FALSE ) -, m_pSchedule( pShed ? pShed : smnew CAMSchedule(CreateEvent(NULL, FALSE, FALSE, NULL)) ) +, m_pSchedule( pShed ? pShed : new CAMSchedule(CreateEvent(NULL, FALSE, FALSE, NULL)) ) , m_hThread(0) { diff --git a/src/BaseClasses/renbase.cpp b/src/BaseClasses/renbase.cpp index fee8e555ff..81cdb60b24 100644 --- a/src/BaseClasses/renbase.cpp +++ b/src/BaseClasses/renbase.cpp @@ -107,7 +107,7 @@ HRESULT CBaseRenderer::GetMediaPositionInterface(REFIID riid,void **ppv) // control interface (IMediaPosition) which in fact simply takes the // calls normally from the filter graph and passes them upstream - m_pPosition = smnew CRendererPosPassThru(NAME("Renderer CPosPassThru"), + m_pPosition = new CRendererPosPassThru(NAME("Renderer CPosPassThru"), CBaseFilter::GetOwner(), (HRESULT *) &hr, GetPin(0)); @@ -598,7 +598,7 @@ CBasePin *CBaseRenderer::GetPin(int n) // hr's value if an error occurs. HRESULT hr = NOERROR; - m_pInputPin = smnew CRendererInputPin(this,&hr,L"In"); + m_pInputPin = new CRendererInputPin(this,&hr,L"In"); if (NULL == m_pInputPin) { return NULL; } diff --git a/src/BaseClasses/schedule.cpp b/src/BaseClasses/schedule.cpp index 37ac135181..975fa20321 100644 --- a/src/BaseClasses/schedule.cpp +++ b/src/BaseClasses/schedule.cpp @@ -88,7 +88,7 @@ DWORD_PTR CAMSchedule::AddAdvisePacket --m_dwCacheCount; } else { - p = smnew CAdvisePacket(); + p = new CAdvisePacket(); } if(p) { p->m_rtEventTime = time1; p->m_rtPeriod = time2; diff --git a/src/BaseClasses/seekpt.cpp b/src/BaseClasses/seekpt.cpp index 4dbc2bb08f..2f49f6660b 100644 --- a/src/BaseClasses/seekpt.cpp +++ b/src/BaseClasses/seekpt.cpp @@ -19,7 +19,7 @@ CUnknown * CSeekingPassThru::CreateInstance(LPUNKNOWN pUnk, HRESULT *phr) { - return smnew CSeekingPassThru(NAME("Seeking PassThru"),pUnk, phr); + return new CSeekingPassThru(NAME("Seeking PassThru"),pUnk, phr); } @@ -59,12 +59,12 @@ STDMETHODIMP CSeekingPassThru::Init(BOOL bRendererSeeking, IPin *pPin) } else { m_pPosPassThru = bRendererSeeking ? - smnew CRendererPosPassThru( + new CRendererPosPassThru( NAME("Render Seeking COM object"), (IUnknown *)this, &hr, pPin) : - smnew CPosPassThru( + new CPosPassThru( NAME("Render Seeking COM object"), (IUnknown *)this, &hr, diff --git a/src/BaseClasses/source.cpp b/src/BaseClasses/source.cpp index d2c85d9eb4..f8cb36360a 100644 --- a/src/BaseClasses/source.cpp +++ b/src/BaseClasses/source.cpp @@ -75,7 +75,7 @@ HRESULT CSource::AddPin(CSourceStream *pStream) { CAutoLock lock(&m_cStateLock); /* Allocate space for this pin and the old ones */ - CSourceStream **paStreams = smnew CSourceStream *[m_iPins + 1]; + CSourceStream **paStreams = new CSourceStream *[m_iPins + 1]; if(paStreams == NULL) { return E_OUTOFMEMORY; } diff --git a/src/BaseClasses/sysclock.cpp b/src/BaseClasses/sysclock.cpp index 20d043b839..b07a2e5cbb 100644 --- a/src/BaseClasses/sysclock.cpp +++ b/src/BaseClasses/sysclock.cpp @@ -30,7 +30,7 @@ int g_cTemplates = sizeof(g_Templates) / sizeof(g_Templates[0]); /* This goes in the factory template table to create new instances */ CUnknown * WINAPI CSystemClock::CreateInstance(LPUNKNOWN pUnk,HRESULT *phr) { - return smnew CSystemClock(NAME("System reference clock"),pUnk, phr); + return new CSystemClock(NAME("System reference clock"),pUnk, phr); } diff --git a/src/BaseClasses/transfrm.cpp b/src/BaseClasses/transfrm.cpp index a170300046..9e328c9e6e 100644 --- a/src/BaseClasses/transfrm.cpp +++ b/src/BaseClasses/transfrm.cpp @@ -89,7 +89,7 @@ CTransformFilter::GetPin(int n) { if(m_pInput == NULL) { - m_pInput = smnew CTransformInputPin(NAME("Transform input pin"), + m_pInput = new CTransformInputPin(NAME("Transform input pin"), this, // Owner filter &hr, // Result code L"XForm In"); // Pin name @@ -101,7 +101,7 @@ CTransformFilter::GetPin(int n) { return NULL; } m_pOutput = (CTransformOutputPin *) - smnew CTransformOutputPin(NAME("Transform output pin"), + new CTransformOutputPin(NAME("Transform output pin"), this, // Owner filter &hr, // Result code L"XForm Out"); // Pin name diff --git a/src/BaseClasses/transip.cpp b/src/BaseClasses/transip.cpp index 187c2a9d0b..3e87572891 100644 --- a/src/BaseClasses/transip.cpp +++ b/src/BaseClasses/transip.cpp @@ -310,7 +310,7 @@ CTransInPlaceFilter::GetPin(int n) { if(m_pInput == NULL) { - m_pInput = smnew CTransInPlaceInputPin(NAME("TransInPlace input pin") + m_pInput = new CTransInPlaceInputPin(NAME("TransInPlace input pin") , this // Owner filter , &hr // Result code , L"Input" // Pin name @@ -324,7 +324,7 @@ CTransInPlaceFilter::GetPin(int n) { if(m_pInput!=NULL && m_pOutput == NULL) { - m_pOutput = smnew CTransInPlaceOutputPin(NAME("TransInPlace output pin") + m_pOutput = new CTransInPlaceOutputPin(NAME("TransInPlace output pin") , this // Owner filter , &hr // Result code , L"Output" // Pin name diff --git a/src/BaseClasses/winutil.cpp b/src/BaseClasses/winutil.cpp index 6551bd3cd2..df9c10dc0d 100644 --- a/src/BaseClasses/winutil.cpp +++ b/src/BaseClasses/winutil.cpp @@ -1615,7 +1615,7 @@ CImageSample *CImageAllocator::CreateImageSample(LPBYTE pData,LONG Length) // Allocate the new sample and check the return codes - pSample = smnew CImageSample((CBaseAllocator *) this, // Base class + pSample = new CImageSample((CBaseAllocator *) this, // Base class NAME("Video sample"), // DEBUG name (HRESULT *) &hr, // Return code (LPBYTE) pData, // DIB address @@ -2023,7 +2023,7 @@ HPALETTE CImagePalette::MakePalette(const VIDEOINFOHEADER *pVideoInfo, LPSTR szD LOGPALETTE *lp; // Used to create a palette HPALETTE hPalette; // Logical palette object - lp = (LOGPALETTE *) smnew BYTE[sizeof(LOGPALETTE) + SIZE_PALETTE]; + lp = (LOGPALETTE *) new BYTE[sizeof(LOGPALETTE) + SIZE_PALETTE]; if (lp == NULL) { return NULL; } diff --git a/src/BaseClasses/wxdebug.cpp b/src/BaseClasses/wxdebug.cpp index 74023d72da..b8087ae922 100644 --- a/src/BaseClasses/wxdebug.cpp +++ b/src/BaseClasses/wxdebug.cpp @@ -757,7 +757,7 @@ DWORD WINAPI DbgRegisterObjectCreation(const CHAR *szObjectName, /* Create a place holder for this object description */ - ObjectDesc *pObject = smnew ObjectDesc; + ObjectDesc *pObject = new ObjectDesc; ASSERT(pObject); /* It is valid to pass a NULL object name */ @@ -1047,7 +1047,7 @@ CDisp::CDisp(IPin *pPin) { lstrcpy(str, TEXT("NULL IPin")); } - m_pString = (PTCHAR) smnew TCHAR[lstrlen(str)+64]; + m_pString = (PTCHAR) new TCHAR[lstrlen(str)+64]; if(!m_pString) { return; } @@ -1065,7 +1065,7 @@ CDisp::CDisp(IUnknown *pUnk) { if(SUCCEEDED(hr)) { QueryFilterInfoReleaseGraph(fi); - m_pString = smnew TCHAR[lstrlenW(fi.achName) + 1]; + m_pString = new TCHAR[lstrlenW(fi.achName) + 1]; if(m_pString) { wsprintf(m_pString, TEXT("%ls"), fi.achName); } diff --git a/src/BaseClasses/wxlist.cpp b/src/BaseClasses/wxlist.cpp index 97066b0df2..214d096969 100644 --- a/src/BaseClasses/wxlist.cpp +++ b/src/BaseClasses/wxlist.cpp @@ -396,7 +396,7 @@ POSITION CBaseList::AddTailI(void *pObject) pNode = (CNode *) m_Cache.RemoveFromCache(); if (pNode == NULL) { - pNode = smnew CNode; + pNode = new CNode; } /* Check we have a valid object */ @@ -445,7 +445,7 @@ POSITION CBaseList::AddHeadI(void *pObject) pNode = (CNode *) m_Cache.RemoveFromCache(); if (pNode == NULL) { - pNode = smnew CNode; + pNode = new CNode; } /* Check we have a valid object */ @@ -549,7 +549,7 @@ POSITION CBaseList::AddAfterI(POSITION pos, void * pObj) CNode *pNode = (CNode *) m_Cache.RemoveFromCache(); if (pNode == NULL) { - pNode = smnew CNode; + pNode = new CNode; } /* Check we have a valid object */ @@ -616,7 +616,7 @@ POSITION CBaseList::AddBeforeI(POSITION pos, void * pObj) CNode * pNode = (CNode *) m_Cache.RemoveFromCache(); if (pNode == NULL) { - pNode = smnew CNode; + pNode = new CNode; } /* Check we have a valid object */ diff --git a/src/BaseClasses/wxutil.h b/src/BaseClasses/wxutil.h index 689600a942..92941e87dd 100644 --- a/src/BaseClasses/wxutil.h +++ b/src/BaseClasses/wxutil.h @@ -263,7 +263,7 @@ private: InitializeCriticalSection(&CritSect); hSemPut = CreateSemaphore(NULL, n, n, NULL); hSemGet = CreateSemaphore(NULL, 0, n, NULL); - QueueObjects = smnew T[n]; + QueueObjects = new T[n]; } diff --git a/src/BeginnerHelper.cpp b/src/BeginnerHelper.cpp index bb395e3095..5fe57b0c64 100644 --- a/src/BeginnerHelper.cpp +++ b/src/BeginnerHelper.cpp @@ -64,8 +64,8 @@ BeginnerHelper::BeginnerHelper() FOREACH_PlayerNumber( pn ) m_bPlayerEnabled[pn] = false; FOREACH_PlayerNumber( pn ) - m_pDancer[pn] = smnew Model; - m_pDancePad = smnew Model; + m_pDancer[pn] = new Model; + m_pDancePad = new Model; } BeginnerHelper::~BeginnerHelper() diff --git a/src/CharacterManager.cpp b/src/CharacterManager.cpp index c7fc971476..8b70d9139f 100644 --- a/src/CharacterManager.cpp +++ b/src/CharacterManager.cpp @@ -39,7 +39,7 @@ CharacterManager::CharacterManager() if( sCharName.CompareNoCase("default")==0 ) FoundDefault = true; - Character* pChar = smnew Character; + Character* pChar = new Character; if( pChar->Load( as[i] ) ) m_pCharacters.push_back( pChar ); else diff --git a/src/CourseLoaderCRS.cpp b/src/CourseLoaderCRS.cpp index e066d06dfe..a928c6790c 100644 --- a/src/CourseLoaderCRS.cpp +++ b/src/CourseLoaderCRS.cpp @@ -472,7 +472,7 @@ bool CourseLoaderCRS::LoadEditFromFile( const RString &sEditFilePath, ProfileSlo LOG->UserLog( "Edit file", sEditFilePath, "couldn't be opened: %s", msd.GetError().c_str() ); return false; } - Course *pCourse = smnew Course; + Course *pCourse = new Course; pCourse->m_sPath = sEditFilePath; LoadFromMsd( sEditFilePath, msd, *pCourse, true ); @@ -485,7 +485,7 @@ bool CourseLoaderCRS::LoadEditFromFile( const RString &sEditFilePath, ProfileSlo bool CourseLoaderCRS::LoadEditFromBuffer( const RString &sBuffer, const RString &sPath, ProfileSlot slot ) { - Course *pCourse = smnew Course; + Course *pCourse = new Course; if( !LoadFromBuffer(sPath, sBuffer, *pCourse) ) { delete pCourse; diff --git a/src/CourseUtil.cpp b/src/CourseUtil.cpp index 59dd0e1bbe..44ed9212c4 100644 --- a/src/CourseUtil.cpp +++ b/src/CourseUtil.cpp @@ -573,7 +573,7 @@ Course *CourseID::ToCourse() const XNode* CourseID::CreateNode() const { - XNode* pNode = smnew XNode( "Course" );; + XNode* pNode = new XNode( "Course" );; if( !sPath.empty() ) pNode->AppendAttr( "Path", sPath ); diff --git a/src/CreateZip.cpp b/src/CreateZip.cpp index cf341c885c..1911f3ec19 100644 --- a/src/CreateZip.cpp +++ b/src/CreateZip.cpp @@ -676,7 +676,7 @@ ZRESULT TZip::open_file(const TCHAR *fn) hfin=0; bufin=0; crc=CRCVAL_INITIAL; isize=0; csize=0; ired=0; if (fn==0) return ZR_ARGS; - hfin = smnew RageFile(); + hfin = new RageFile(); if( !hfin->Open(fn) ) { SAFE_DELETE( hfin ); @@ -933,8 +933,8 @@ ZRESULT TZip::Add(const TCHAR *odstzn, const TCHAR *src,unsigned long flags) return oerr; // Keep a copy of the zipfileinfo, for our end-of-zip directory - char *cextra = smnew char[zfi.cext]; memcpy(cextra,zfi.cextra,zfi.cext); zfi.cextra=cextra; - TZipFileInfo *pzfi = smnew TZipFileInfo; memcpy(pzfi,&zfi,sizeof(zfi)); + char *cextra = new char[zfi.cext]; memcpy(cextra,zfi.cextra,zfi.cext); zfi.cextra=cextra; + TZipFileInfo *pzfi = new TZipFileInfo; memcpy(pzfi,&zfi,sizeof(zfi)); if (zfis==NULL) zfis=pzfi; else @@ -999,7 +999,7 @@ CreateZip::CreateZip() bool CreateZip::Start( RageFile *f) { - hz = smnew TZip(); + hz = new TZip(); lasterrorZ = hz->Start(f); return lasterrorZ == ZR_OK; } diff --git a/src/CryptManager.cpp b/src/CryptManager.cpp index 2f0434a934..1c2427b7de 100644 --- a/src/CryptManager.cpp +++ b/src/CryptManager.cpp @@ -95,7 +95,7 @@ CryptManager::CryptManager() ltc_mp = ltm_desc; - g_pPRNG = smnew PRNGWrapper( &yarrow_desc ); + g_pPRNG = new PRNGWrapper( &yarrow_desc ); } void CryptManager::GenerateGlobalKeys() diff --git a/src/DancingCharacters.cpp b/src/DancingCharacters.cpp index 2193a382a3..9c4c9bb4fe 100644 --- a/src/DancingCharacters.cpp +++ b/src/DancingCharacters.cpp @@ -52,7 +52,7 @@ DancingCharacters::DancingCharacters(): m_bDrawDangerLight(false), { FOREACH_PlayerNumber( p ) { - m_pCharacter[p] = smnew Model; + m_pCharacter[p] = new Model; m_2DIdleTimer[p].SetZero(); m_i2DAnimState[p] = AS2D_IDLE; // start on idle state if( !GAMESTATE->IsPlayerEnabled(p) ) diff --git a/src/Difficulty.cpp b/src/Difficulty.cpp index 15c687a4f3..9f18ac5442 100644 --- a/src/Difficulty.cpp +++ b/src/Difficulty.cpp @@ -28,7 +28,7 @@ const RString &CourseDifficultyToLocalizedString( CourseDifficulty x ) { FOREACH_ENUM( Difficulty,i) { - auto_ptr ap( smnew LocalizedString("CourseDifficulty", DifficultyToString(i)) ); + auto_ptr ap( new LocalizedString("CourseDifficulty", DifficultyToString(i)) ); g_CourseDifficultyName[i] = ap; } } diff --git a/src/DynamicActorScroller.cpp b/src/DynamicActorScroller.cpp index a07fabd181..ba877146de 100644 --- a/src/DynamicActorScroller.cpp +++ b/src/DynamicActorScroller.cpp @@ -7,7 +7,7 @@ #include "RageUtil.h" #include "LuaBinding.h" -DynamicActorScroller *DynamicActorScroller::Copy() const { return smnew DynamicActorScroller(*this); } +DynamicActorScroller *DynamicActorScroller::Copy() const { return new DynamicActorScroller(*this); } void DynamicActorScroller::LoadFromNode( const XNode *pNode ) { diff --git a/src/EnumHelper.cpp b/src/EnumHelper.cpp index e69ea24a5a..dec4665019 100644 --- a/src/EnumHelper.cpp +++ b/src/EnumHelper.cpp @@ -57,11 +57,11 @@ const RString &EnumToString( int iVal, int iMax, const char **szNameArray, auto_ { for( int i = 0; i < iMax; ++i ) { - auto_ptr ap( smnew RString( szNameArray[i] ) ); + auto_ptr ap( new RString( szNameArray[i] ) ); pNameCache[i] = ap; } - auto_ptr ap( smnew RString ); + auto_ptr ap( new RString ); pNameCache[iMax+1] = ap; } diff --git a/src/EnumHelper.h b/src/EnumHelper.h index 1cd47d767c..dc1049cc0c 100644 --- a/src/EnumHelper.h +++ b/src/EnumHelper.h @@ -84,7 +84,7 @@ const RString &X##ToLocalizedString( X x ) \ if( g_##X##Name[0].get() == NULL ) { \ for( unsigned i = 0; i < NUM_##X; ++i ) \ { \ - auto_ptr ap( smnew LocalizedString(#X, X##ToString((X)i)) ); \ + auto_ptr ap( new LocalizedString(#X, X##ToString((X)i)) ); \ g_##X##Name[i] = ap; \ } \ } \ diff --git a/src/Font.cpp b/src/Font.cpp index 1cc161929c..e0c3841bbc 100644 --- a/src/Font.cpp +++ b/src/Font.cpp @@ -749,7 +749,7 @@ void Font::Load( const RString &sIniPath, RString sChars ) continue; // Create this down here so it doesn't leak if the continue gets triggered. - FontPage *pPage = smnew FontPage; + FontPage *pPage = new FontPage; // Load settings for this page from the INI. FontPageSettings cfg; diff --git a/src/FontManager.cpp b/src/FontManager.cpp index dc3ee9199c..42b56ad5ea 100644 --- a/src/FontManager.cpp +++ b/src/FontManager.cpp @@ -47,7 +47,7 @@ Font* FontManager::LoadFont( const RString &sFontOrTextureFilePath, RString sCha return pFont; } - Font *f = smnew Font; + Font *f = new Font; f->Load(sFontOrTextureFilePath, sChars); g_mapPathToFont[NewName] = f; return f; diff --git a/src/GameCommand.cpp b/src/GameCommand.cpp index 8bc5501ec8..d8cf71b693 100644 --- a/src/GameCommand.cpp +++ b/src/GameCommand.cpp @@ -26,7 +26,7 @@ static LocalizedString COULD_NOT_LAUNCH_BROWSER( "GameCommand", "Could not launch web browser." ); -REGISTER_CLASS_TRAITS( GameCommand, smnew GameCommand(*pCopy) ); +REGISTER_CLASS_TRAITS( GameCommand, new GameCommand(*pCopy) ); void GameCommand::Init() { diff --git a/src/GameLoop.cpp b/src/GameLoop.cpp index 019df7d64a..d30cba98da 100644 --- a/src/GameLoop.cpp +++ b/src/GameLoop.cpp @@ -141,7 +141,7 @@ namespace // Apply the new window title, icon and aspect ratio. StepMania::ApplyGraphicOptions(); - SCREENMAN = smnew ScreenManager(); + SCREENMAN = new ScreenManager(); StepMania::ResetGame(); SCREENMAN->ThemeChanged(); @@ -340,7 +340,7 @@ int ConcurrentRenderer::StartRenderThread( void *p ) void GameLoop::StartConcurrentRendering() { if( g_pConcurrentRenderer == NULL ) - g_pConcurrentRenderer = smnew ConcurrentRenderer; + g_pConcurrentRenderer = new ConcurrentRenderer; g_pConcurrentRenderer->Start(); } diff --git a/src/GameSoundManager.cpp b/src/GameSoundManager.cpp index 4fea822758..e7256efed2 100644 --- a/src/GameSoundManager.cpp +++ b/src/GameSoundManager.cpp @@ -113,7 +113,7 @@ static void StartMusic( MusicToPlay &ToPlay ) /* StopPlaying() can take a while, so don't hold the lock while we stop the sound. * Be sure to leave the rest of g_Playing in place. */ RageSound *pOldSound = g_Playing->m_Music; - g_Playing->m_Music = smnew RageSound; + g_Playing->m_Music = new RageSound; L.Unlock(); delete pOldSound; @@ -125,13 +125,13 @@ static void StartMusic( MusicToPlay &ToPlay ) MusicPlaying *NewMusic; { g_Mutex->Unlock(); - RageSound *pSound = smnew RageSound; + RageSound *pSound = new RageSound; RageSoundLoadParams params; params.m_bSupportRateChanging = ToPlay.bApplyMusicRate; pSound->Load( ToPlay.m_sFile, false, ¶ms ); g_Mutex->Lock(); - NewMusic = smnew MusicPlaying( pSound ); + NewMusic = new MusicPlaying( pSound ); } NewMusic->m_Timing = g_Playing->m_Timing; @@ -273,7 +273,7 @@ static void StartMusic( MusicToPlay &ToPlay ) static void DoPlayOnce( RString sPath ) { /* We want this to start quickly, so don't try to prebuffer it. */ - RageSound *pSound = smnew RageSound; + RageSound *pSound = new RageSound; pSound->Load( sPath, false ); pSound->Play(); @@ -357,7 +357,7 @@ static void StartQueuedSounds() /* StopPlaying() can take a while, so don't hold the lock while we stop the sound. */ g_Mutex->Lock(); RageSound *pOldSound = g_Playing->m_Music; - g_Playing->m_Music = smnew RageSound; + g_Playing->m_Music = new RageSound; g_Mutex->Unlock(); delete pOldSound; @@ -412,8 +412,8 @@ GameSoundManager::GameSoundManager() /* Init RageSoundMan first: */ ASSERT( SOUNDMAN != NULL ); - g_Mutex = smnew RageEvent("GameSoundManager"); - g_Playing = smnew MusicPlaying( smnew RageSound ); + g_Mutex = new RageEvent("GameSoundManager"); + g_Playing = new MusicPlaying( new RageSound ); g_UpdatingTimer = true; diff --git a/src/GameState.cpp b/src/GameState.cpp index 02d2a2440a..02ba9cdb91 100644 --- a/src/GameState.cpp +++ b/src/GameState.cpp @@ -131,7 +131,7 @@ GameState::GameState() : m_iEditCourseEntryIndex( Message_EditCourseEntryIndexChanged ), m_sEditLocalProfileID( Message_EditLocalProfileIDChanged ) { - g_pImpl = smnew GameStateImpl; + g_pImpl = new GameStateImpl; SetCurrentStyle( NULL ); @@ -148,17 +148,17 @@ GameState::GameState() : FOREACH_PlayerNumber( p ) { - m_pPlayerState[p] = smnew PlayerState; + m_pPlayerState[p] = new PlayerState; m_pPlayerState[p]->m_PlayerNumber = p; } FOREACH_MultiPlayer( p ) { - m_pMultiPlayerState[p] = smnew PlayerState; + m_pMultiPlayerState[p] = new PlayerState; m_pMultiPlayerState[p]->m_PlayerNumber = PLAYER_1; m_pMultiPlayerState[p]->m_mp = p; } - m_Environment = smnew LuaTable; + m_Environment = new LuaTable; m_bDopefish = false; diff --git a/src/GraphDisplay.cpp b/src/GraphDisplay.cpp index c05076bd9a..e5891b2397 100644 --- a/src/GraphDisplay.cpp +++ b/src/GraphDisplay.cpp @@ -228,10 +228,10 @@ void GraphDisplay::Load( RString sMetricsGroup ) m_sprBacking->ZoomToHeight( m_size.y ); this->AddChild( m_sprBacking ); - m_pGraphBody = smnew GraphBody( THEME->GetPathG(sMetricsGroup,"Body") ); + m_pGraphBody = new GraphBody( THEME->GetPathG(sMetricsGroup,"Body") ); this->AddChild( m_pGraphBody ); - m_pGraphLine = smnew GraphLine; + m_pGraphLine = new GraphLine; m_pGraphLine->SetName("Line"); ActorUtil::LoadAllCommands( m_pGraphLine, sMetricsGroup ); this->AddChild( m_pGraphLine ); diff --git a/src/HighScore.cpp b/src/HighScore.cpp index 5aca5f8e5d..66644ecb06 100644 --- a/src/HighScore.cpp +++ b/src/HighScore.cpp @@ -91,7 +91,7 @@ HighScoreImpl::HighScoreImpl() XNode *HighScoreImpl::CreateNode() const { - XNode *pNode = smnew XNode( "HighScore" ); + XNode *pNode = new XNode( "HighScore" ); const bool bWriteSimpleValues = RadarValues::WRITE_SIMPLE_VALIES; const bool bWriteComplexValues = RadarValues::WRITE_COMPLEX_VALIES; @@ -162,16 +162,16 @@ void HighScoreImpl::LoadFromNode( const XNode *pNode ) grade = clamp( grade, Grade_Tier01, Grade_Failed ); } -REGISTER_CLASS_TRAITS( HighScoreImpl, smnew HighScoreImpl(*pCopy) ) +REGISTER_CLASS_TRAITS( HighScoreImpl, new HighScoreImpl(*pCopy) ) HighScore::HighScore() { - m_Impl = smnew HighScoreImpl; + m_Impl = new HighScoreImpl; } void HighScore::Unset() { - m_Impl = smnew HighScoreImpl; + m_Impl = new HighScoreImpl; } bool HighScore::IsEmpty() const @@ -328,7 +328,7 @@ const HighScore& HighScoreList::GetTopScore() const XNode* HighScoreList::CreateNode() const { - XNode* pNode = smnew XNode( "HighScoreList" ); + XNode* pNode = new XNode( "HighScoreList" ); pNode->AppendChild( "NumTimesPlayed", iNumTimesPlayed ); pNode->AppendChild( "LastPlayed", dtLastPlayed.GetString() ); @@ -408,7 +408,7 @@ void HighScoreList::ClampSize( bool bIsMachine ) XNode* Screenshot::CreateNode() const { - XNode* pNode = smnew XNode( "Screenshot" ); + XNode* pNode = new XNode( "Screenshot" ); // TRICKY: Don't write "name to fill in" markers. pNode->AppendChild( "FileName", sFileName ); diff --git a/src/InputFilter.cpp b/src/InputFilter.cpp index 0bdc242f33..bec28d0dcb 100644 --- a/src/InputFilter.cpp +++ b/src/InputFilter.cpp @@ -93,7 +93,7 @@ static float g_fTimeBeforeRepeats, g_fTimeBetweenRepeats; InputFilter::InputFilter() { - queuemutex = smnew RageMutex("InputFilter"); + queuemutex = new RageMutex("InputFilter"); Reset(); ResetRepeatRate(); diff --git a/src/Inventory.cpp b/src/Inventory.cpp index 148cb21c41..5124d15c33 100644 --- a/src/Inventory.cpp +++ b/src/Inventory.cpp @@ -78,7 +78,7 @@ void Inventory::Load( PlayerState* pPlayerState ) m_soundAcquireItem.Load( THEME->GetPathS("Inventory","aquire item") ); for( unsigned i=0; iLoad( THEME->GetPathS("Inventory",ssprintf("use item %u",i+1)) ); m_vpSoundUseItem.push_back( pSound ); } diff --git a/src/JsonUtil.h b/src/JsonUtil.h index 7bd46458d4..3cb1bdf673 100644 --- a/src/JsonUtil.h +++ b/src/JsonUtil.h @@ -163,7 +163,7 @@ namespace JsonUtil v.resize(root.size()); for(unsigned i=0; iAddChild( m_sprDanger ); - m_pStream = smnew StreamDisplay; + m_pStream = new StreamDisplay; m_pStream->Load( bExtra ? "StreamDisplayExtra" : "StreamDisplay" ); m_pStream->SetName( "Stream" ); ActorUtil::LoadAllCommandsAndSetXY( m_pStream, sType ); diff --git a/src/LifeMeterTime.cpp b/src/LifeMeterTime.cpp index 0a7cc27ae8..a113d26fae 100644 --- a/src/LifeMeterTime.cpp +++ b/src/LifeMeterTime.cpp @@ -77,7 +77,7 @@ void LifeMeterTime::Load( const PlayerState *pPlayerState, PlayerStageStats *pPl m_quadDangerGlow.SetEffectClock( Actor::CLOCK_BGM_BEAT ); this->AddChild( &m_quadDangerGlow ); - m_pStream = smnew StreamDisplay; + m_pStream = new StreamDisplay; bool bExtra = GAMESTATE->IsAnExtraStage(); m_pStream->Load( bExtra ? "StreamDisplayExtra" : "StreamDisplay" ); this->AddChild( m_pStream ); diff --git a/src/LocalizedString.cpp b/src/LocalizedString.cpp index a334a6ea7b..b10b0d2bb0 100644 --- a/src/LocalizedString.cpp +++ b/src/LocalizedString.cpp @@ -13,7 +13,7 @@ SubscriptionManager & GetSubscribers() class LocalizedStringImplDefault: public ILocalizedStringImpl { public: - static ILocalizedStringImpl *Create() { return smnew LocalizedStringImplDefault; } + static ILocalizedStringImpl *Create() { return new LocalizedStringImplDefault; } void Load( const RString& sGroup, const RString& sName ) { diff --git a/src/LuaBinding.cpp b/src/LuaBinding.cpp index 7399fb9321..a7b9467139 100644 --- a/src/LuaBinding.cpp +++ b/src/LuaBinding.cpp @@ -306,7 +306,7 @@ void LuaBinding::ApplyDerivedType( Lua *L, const RString &sClassName, void *pSel } #include "RageUtil_AutoPtr.h" -REGISTER_CLASS_TRAITS( LuaClass, smnew LuaClass(*pCopy) ) +REGISTER_CLASS_TRAITS( LuaClass, new LuaClass(*pCopy) ) void *LuaBinding::GetPointerFromStack( Lua *L, const RString &sType, int iArg ) { diff --git a/src/LuaManager.cpp b/src/LuaManager.cpp index d81d9cade1..77e36614c6 100644 --- a/src/LuaManager.cpp +++ b/src/LuaManager.cpp @@ -239,7 +239,7 @@ void LuaManager::Register( RegisterWithLuaFn pfn ) LuaManager::LuaManager() { - pImpl = smnew Impl; + pImpl = new Impl; LUA = this; // so that LUA is available when we call the Register functions lua_State *L = lua_open(); @@ -373,8 +373,8 @@ void LuaManager::RegisterTypes() LuaThreadVariable::LuaThreadVariable( const RString &sName, const RString &sValue ) { - m_Name = smnew LuaReference; - m_pOldValue = smnew LuaReference; + m_Name = new LuaReference; + m_pOldValue = new LuaReference; Lua *L = LUA->Get(); LuaHelpers::Push( L, sName ); @@ -386,8 +386,8 @@ LuaThreadVariable::LuaThreadVariable( const RString &sName, const RString &sValu LuaThreadVariable::LuaThreadVariable( const RString &sName, const LuaReference &Value ) { - m_Name = smnew LuaReference; - m_pOldValue = smnew LuaReference; + m_Name = new LuaReference; + m_pOldValue = new LuaReference; Lua *L = LUA->Get(); LuaHelpers::Push( L, sName ); @@ -401,8 +401,8 @@ LuaThreadVariable::LuaThreadVariable( const RString &sName, const LuaReference & // name and value are on the stack LuaThreadVariable::LuaThreadVariable( lua_State *L ) { - m_Name = smnew LuaReference; - m_pOldValue = smnew LuaReference; + m_Name = new LuaReference; + m_pOldValue = new LuaReference; lua_pushvalue( L, -2 ); m_Name->SetFromStack( L ); @@ -547,7 +547,7 @@ namespace XNode *LuaHelpers::GetLuaInformation() { - XNode *pLuaNode = smnew XNode( "Lua" ); + XNode *pLuaNode = new XNode( "Lua" ); XNode *pGlobalsNode = pLuaNode->AppendChild( "GlobalFunctions" ); XNode *pClassesNode = pLuaNode->AppendChild( "Classes" ); @@ -1042,7 +1042,7 @@ namespace FOREACH_LUATABLE( L, 2 ) { lua_pushvalue( L, -2 ); - LuaThreadVariable *pVar = smnew LuaThreadVariable( L ); + LuaThreadVariable *pVar = new LuaThreadVariable( L ); apVars.push_back( pVar ); } diff --git a/src/LuaReference.cpp b/src/LuaReference.cpp index f6b4bd361a..537337ca09 100644 --- a/src/LuaReference.cpp +++ b/src/LuaReference.cpp @@ -1,7 +1,7 @@ #include "global.h" #include "LuaReference.h" -REGISTER_CLASS_TRAITS( LuaReference, smnew LuaReference(*pCopy) ) +REGISTER_CLASS_TRAITS( LuaReference, new LuaReference(*pCopy) ) LuaReference::LuaReference() { @@ -170,7 +170,7 @@ namespace LuaHelpers template<> bool FromStack( lua_State *L, apActorCommands &Object, int iOffset ) { - LuaReference *pRef = smnew LuaReference; + LuaReference *pRef = new LuaReference; FromStack( L, *pRef, iOffset ); Object = apActorCommands( pRef ); return true; diff --git a/src/MemoryCardManager.cpp b/src/MemoryCardManager.cpp index e3f62329ce..6c30e7be0b 100644 --- a/src/MemoryCardManager.cpp +++ b/src/MemoryCardManager.cpp @@ -142,7 +142,7 @@ ThreadedMemoryCardWorker::ThreadedMemoryCardWorker(): if( g_bMemoryCards ) m_pDriver = MemoryCardDriver::Create(); else - m_pDriver = smnew MemoryCardDriver_Null; + m_pDriver = new MemoryCardDriver_Null; m_MountThreadState = detect_and_mount; SetHeartbeat( 0.1f ); @@ -268,7 +268,7 @@ MemoryCardManager::MemoryCardManager() LUA->Release( L ); } - g_pWorker = smnew ThreadedMemoryCardWorker; + g_pWorker = new ThreadedMemoryCardWorker; FOREACH_PlayerNumber( p ) { diff --git a/src/MenuTimer.cpp b/src/MenuTimer.cpp index 6211dc203b..066b593e29 100644 --- a/src/MenuTimer.cpp +++ b/src/MenuTimer.cpp @@ -58,7 +58,7 @@ void MenuTimer::Load( RString sMetricsGroup ) if(WARNING_COMMAND) WARNING_COMMAND->Clear(); - WARNING_COMMAND = smnew ThemeMetric1D(sMetricsGroup, WARNING_COMMAND_NAME, WARNING_START+1); + WARNING_COMMAND = new ThemeMetric1D(sMetricsGroup, WARNING_COMMAND_NAME, WARNING_START+1); m_fStallSecondsLeft = MAX_STALL_SECONDS; } diff --git a/src/MessageManager.cpp b/src/MessageManager.cpp index a911e11894..d1aac2c00f 100644 --- a/src/MessageManager.cpp +++ b/src/MessageManager.cpp @@ -96,7 +96,7 @@ static map g_MessageToSubscribers; Message::Message( const RString &s ) { m_sName = s; - m_pParams = smnew LuaTable; + m_pParams = new LuaTable; m_bBroadcast = false; } @@ -105,11 +105,11 @@ Message::Message( const RString &s, const LuaReference ¶ms ) m_sName = s; m_bBroadcast = false; Lua *L = LUA->Get(); - m_pParams = smnew LuaTable; // XXX: creates an extra table + m_pParams = new LuaTable; // XXX: creates an extra table params.PushSelf( L ); m_pParams->SetFromStack( L ); LUA->Release( L ); -// m_pParams = smnew LuaTable( params ); +// m_pParams = new LuaTable( params ); } Message::~Message() diff --git a/src/ModIconRow.cpp b/src/ModIconRow.cpp index 42f451676d..7ecf1ce320 100644 --- a/src/ModIconRow.cpp +++ b/src/ModIconRow.cpp @@ -44,7 +44,7 @@ void ModIconRow::Load( const RString &sMetricsGroup, PlayerNumber pn ) for( int i=0; iSetName( "ModIcon" ); float fOffset = SCALE( i, 0, NUM_OPTION_ICONS-1, -(NUM_OPTION_ICONS-1)/2.0f, (float)(NUM_OPTION_ICONS-1)/2.0f ); p->SetXY( fOffset*SPACING_X, fOffset*SPACING_Y ); diff --git a/src/ModelManager.cpp b/src/ModelManager.cpp index 758bd45032..b054fd2811 100644 --- a/src/ModelManager.cpp +++ b/src/ModelManager.cpp @@ -36,7 +36,7 @@ RageModelGeometry* ModelManager::LoadMilkshapeAscii( const RString& sFile, bool return pGeom; } - RageModelGeometry* pGeom = smnew RageModelGeometry; + RageModelGeometry* pGeom = new RageModelGeometry; pGeom->LoadMilkshapeAscii( sFile, bNeedNormals ); m_mapFileToGeometry[sFile] = pGeom; diff --git a/src/MsdFile.cpp b/src/MsdFile.cpp index c4e11ad0a4..7c52a95625 100644 --- a/src/MsdFile.cpp +++ b/src/MsdFile.cpp @@ -35,7 +35,7 @@ void MsdFile::ReadBuf( const char *buf, int len, bool bUnescape ) bool ReadingValue=false; int i = 0; - char *cProcessed = smnew char[len]; + char *cProcessed = new char[len]; int iProcessedLen = -1; while( i < len ) { diff --git a/src/MusicWheel.cpp b/src/MusicWheel.cpp index 044931acf9..7c2999724c 100644 --- a/src/MusicWheel.cpp +++ b/src/MusicWheel.cpp @@ -66,7 +66,7 @@ static SortOrder ForceAppropriateSort( PlayMode pm, SortOrder so ) MusicWheelItem *MusicWheel::MakeItem() { - return smnew MusicWheelItem; + return new MusicWheelItem; } void MusicWheel::Load( RString sType ) @@ -503,7 +503,7 @@ void MusicWheel::BuildWheelItemDatas( vector &arrayWheelIt for( unsigned i=0; i( smnew GameCommand ); + wid.m_pAction = HiddenPtr( new GameCommand ); wid.m_pAction->m_sName = vsNames[i]; wid.m_pAction->Load( i, ParseCommands(CHOICE.GetValue(vsNames[i])) ); wid.m_sLabel = WHEEL_TEXT( vsNames[i] ); @@ -511,7 +511,7 @@ void MusicWheel::BuildWheelItemDatas( vector &arrayWheelIt if( !wid.m_pAction->IsPlayable() ) continue; - arrayWheelItemDatas.push_back( smnew MusicWheelItemData(wid) ); + arrayWheelItemDatas.push_back( new MusicWheelItemData(wid) ); } break; } @@ -676,18 +676,18 @@ void MusicWheel::BuildWheelItemDatas( vector &arrayWheelIt // In certain situations (e.g. simulating Pump it Up), themes may // want to only show one group at a time. if( !HIDE_INACTIVE_SECTIONS ) - arrayWheelItemDatas.push_back( smnew MusicWheelItemData(WheelItemDataType_Section, NULL, sThisSection, NULL, colorSection, iSectionCount) ); + arrayWheelItemDatas.push_back( new MusicWheelItemData(WheelItemDataType_Section, NULL, sThisSection, NULL, colorSection, iSectionCount) ); sLastSection = sThisSection; } } - arrayWheelItemDatas.push_back( smnew MusicWheelItemData(WheelItemDataType_Song, pSong, sLastSection, NULL, SONGMAN->GetSongColor(pSong), 0) ); + arrayWheelItemDatas.push_back( new MusicWheelItemData(WheelItemDataType_Song, pSong, sLastSection, NULL, SONGMAN->GetSongColor(pSong), 0) ); } if( so != SORT_ROULETTE ) { // todo: allow themers to change the order of the items. -aj if( SHOW_ROULETTE ) - arrayWheelItemDatas.push_back( smnew MusicWheelItemData(WheelItemDataType_Roulette, NULL, "", NULL, ROULETTE_COLOR, 0) ); + arrayWheelItemDatas.push_back( new MusicWheelItemData(WheelItemDataType_Roulette, NULL, "", NULL, ROULETTE_COLOR, 0) ); // Only add WheelItemDataType_Random and WheelItemDataType_Portal if there's at least // one song on the list. @@ -697,10 +697,10 @@ void MusicWheel::BuildWheelItemDatas( vector &arrayWheelIt bFoundAnySong = true; if( SHOW_RANDOM && bFoundAnySong ) - arrayWheelItemDatas.push_back( smnew MusicWheelItemData(WheelItemDataType_Random, NULL, "", NULL, RANDOM_COLOR, 0) ); + arrayWheelItemDatas.push_back( new MusicWheelItemData(WheelItemDataType_Random, NULL, "", NULL, RANDOM_COLOR, 0) ); if( SHOW_PORTAL && bFoundAnySong ) - arrayWheelItemDatas.push_back( smnew MusicWheelItemData(WheelItemDataType_Portal, NULL, "", NULL, PORTAL_COLOR, 0) ); + arrayWheelItemDatas.push_back( new MusicWheelItemData(WheelItemDataType_Portal, NULL, "", NULL, PORTAL_COLOR, 0) ); // add custom wheel items vector vsNames; @@ -708,7 +708,7 @@ void MusicWheel::BuildWheelItemDatas( vector &arrayWheelIt for( unsigned i=0; i( smnew GameCommand ); + wid.m_pAction = HiddenPtr( new GameCommand ); wid.m_pAction->m_sName = vsNames[i]; wid.m_pAction->Load( i, ParseCommands(CUSTOM_CHOICES.GetValue(vsNames[i])) ); wid.m_sLabel = CUSTOM_ITEM_WHEEL_TEXT( vsNames[i] ); @@ -716,7 +716,7 @@ void MusicWheel::BuildWheelItemDatas( vector &arrayWheelIt if( !wid.m_pAction->IsPlayable() ) continue; - arrayWheelItemDatas.push_back( smnew MusicWheelItemData(wid) ); + arrayWheelItemDatas.push_back( new MusicWheelItemData(wid) ); } } @@ -833,12 +833,12 @@ void MusicWheel::BuildWheelItemDatas( vector &arrayWheelIt { RageColor c = SECTION_COLORS.GetValue(iSectionColorIndex); iSectionColorIndex = (iSectionColorIndex+1) % NUM_SECTION_COLORS; - arrayWheelItemDatas.push_back( smnew MusicWheelItemData(WheelItemDataType_Section, NULL, sThisSection, NULL, c, 0) ); + arrayWheelItemDatas.push_back( new MusicWheelItemData(WheelItemDataType_Section, NULL, sThisSection, NULL, c, 0) ); sLastSection = sThisSection; } RageColor c = ( pCourse->m_sGroupName.size() == 0 ) ? pCourse->GetColor() : SONGMAN->GetCourseColor(pCourse); - arrayWheelItemDatas.push_back( smnew MusicWheelItemData(WheelItemDataType_Course, NULL, sThisSection, pCourse, c, 0) ); + arrayWheelItemDatas.push_back( new MusicWheelItemData(WheelItemDataType_Course, NULL, sThisSection, pCourse, c, 0) ); } break; } @@ -1052,7 +1052,7 @@ void MusicWheel::FilterWheelItemDatas(vector &aUnFilteredD // If we've filtered all items, insert a dummy. if( aFilteredData.empty() ) - aFilteredData.push_back( smnew MusicWheelItemData(WheelItemDataType_Section, NULL, EMPTY_STRING, NULL, EMPTY_COLOR, 0) ); + aFilteredData.push_back( new MusicWheelItemData(WheelItemDataType_Section, NULL, EMPTY_STRING, NULL, EMPTY_COLOR, 0) ); } void MusicWheel::UpdateSwitch() diff --git a/src/MusicWheelItem.cpp b/src/MusicWheelItem.cpp index 3fe4c54756..c179a79a54 100644 --- a/src/MusicWheelItem.cpp +++ b/src/MusicWheelItem.cpp @@ -81,7 +81,7 @@ MusicWheelItem::MusicWheelItem( RString sType ): if( i == MusicWheelItemType_Song ) continue; - m_pText[i] = smnew BitmapText; + m_pText[i] = new BitmapText; m_pText[i]->SetName( MusicWheelItemTypeToString(i) ); ActorUtil::LoadAllCommands( m_pText[i], "MusicWheelItem" ); m_pText[i]->LoadFromFont( THEME->GetPathF(sType,MusicWheelItemTypeToString(i)) ); @@ -90,7 +90,7 @@ MusicWheelItem::MusicWheelItem( RString sType ): this->AddChild( m_pText[i] ); } - m_pTextSectionCount = smnew BitmapText; + m_pTextSectionCount = new BitmapText; m_pTextSectionCount->SetName( "SectionCount" ); ActorUtil::LoadAllCommands( m_pTextSectionCount, "MusicWheelItem" ); m_pTextSectionCount->LoadFromFont( THEME->GetPathF(sType,"SectionCount") ); @@ -151,12 +151,12 @@ MusicWheelItem::MusicWheelItem( const MusicWheelItem &cpy ): } else { - m_pText[i] = smnew BitmapText( *cpy.m_pText[i] ); + m_pText[i] = new BitmapText( *cpy.m_pText[i] ); this->AddChild( m_pText[i] ); } } - m_pTextSectionCount = smnew BitmapText( *cpy.m_pTextSectionCount ); + m_pTextSectionCount = new BitmapText( *cpy.m_pTextSectionCount ); this->AddChild( m_pTextSectionCount ); this->AddChild( &m_WheelNotifyIcon ); diff --git a/src/MusicWheelItem.h b/src/MusicWheelItem.h index 1cd78cfeac..6155e24d70 100644 --- a/src/MusicWheelItem.h +++ b/src/MusicWheelItem.h @@ -39,7 +39,7 @@ public: MusicWheelItem(RString sType = "MusicWheelItem"); MusicWheelItem( const MusicWheelItem &cpy ); virtual ~MusicWheelItem(); - virtual MusicWheelItem *Copy() const { return smnew MusicWheelItem(*this); } + virtual MusicWheelItem *Copy() const { return new MusicWheelItem(*this); } virtual void LoadFromWheelItemData( const WheelItemBaseData* pWID, int iIndex, bool bHasFocus, int iDrawIndex ); virtual void HandleMessage( const Message &msg ); diff --git a/src/NetworkSyncManager.cpp b/src/NetworkSyncManager.cpp index 1a3cd2b839..4e17edb08a 100644 --- a/src/NetworkSyncManager.cpp +++ b/src/NetworkSyncManager.cpp @@ -72,7 +72,7 @@ NetworkSyncManager::NetworkSyncManager( LoadingWindow *ld ) BroadcastReception = NULL; ld->SetText( INITIALIZING_CLIENT_NETWORK ); - NetPlayerClient = smnew EzSockets; + NetPlayerClient = new EzSockets; NetPlayerClient->blocking = false; m_ServerVersion = 0; @@ -212,7 +212,7 @@ void NetworkSyncManager::StartUp() if( GetCommandlineArgument( "netip", &ServerIP ) ) PostStartUp( ServerIP ); - BroadcastReception = smnew EzSockets; + BroadcastReception = new EzSockets; BroadcastReception->create( IPPROTO_UDP ); BroadcastReception->bind( 8765 ); BroadcastReception->blocking = false; @@ -868,7 +868,7 @@ unsigned long NetworkSyncManager::GetCurrentSMBuild( LoadingWindow* ld ) unsigned long uCurrentSMBuild = version_num; bool bSuccess = false; - EzSockets* socket = smnew EzSockets(); + EzSockets* socket = new EzSockets(); socket->create(); socket->blocking = true; @@ -892,7 +892,7 @@ unsigned long NetworkSyncManager::GetCurrentSMBuild( LoadingWindow* ld ) // Aldo: EzSocket::pReadData() is a lower level function, I used it because I was having issues // with EzSocket::ReadData() in 3.9, feel free to refactor this function, the low lever character // manipulation might look scary to people not used to it. - char* cBuffer = smnew char[NETMAXBUFFERSIZE]; + char* cBuffer = new char[NETMAXBUFFERSIZE]; // Reading the first NETMAXBUFFERSIZE bytes (usually 1024), should be enough to get the HTTP Header only int iBytes = socket->pReadData(cBuffer); if( iBytes ) @@ -903,7 +903,7 @@ unsigned long NetworkSyncManager::GetCurrentSMBuild( LoadingWindow* ld ) { // Get the HTTP Header only int iHeaderLength = cBodyStart - cBuffer; - char* cHeader = smnew char[iHeaderLength+1]; + char* cHeader = new char[iHeaderLength+1]; strncpy( cHeader, cBuffer, iHeaderLength ); cHeader[iHeaderLength] = '\0'; // needed to make it a valid C String diff --git a/src/NoteData.cpp b/src/NoteData.cpp index c4cb5b6e29..24bb051fea 100644 --- a/src/NoteData.cpp +++ b/src/NoteData.cpp @@ -13,7 +13,7 @@ #include "Foreach.h" #include "RageUtil_AutoPtr.h" -REGISTER_CLASS_TRAITS( NoteData, smnew NoteData(*pCopy) ) +REGISTER_CLASS_TRAITS( NoteData, new NoteData(*pCopy) ) void NoteData::Init() { @@ -1156,7 +1156,7 @@ bool NoteData::GetPrevTapNoteRowForAllTracks( int &rowInOut ) const XNode* NoteData::CreateNode() const { - XNode *p = smnew XNode( "NoteData" ); + XNode *p = new XNode( "NoteData" ); all_tracks_const_iterator iter = GetTapNoteRangeAllTracks( 0, GetLastRow() ); diff --git a/src/NoteDisplay.cpp b/src/NoteDisplay.cpp index 4f85d24a3f..94cdb1cb23 100644 --- a/src/NoteDisplay.cpp +++ b/src/NoteDisplay.cpp @@ -142,7 +142,7 @@ static NoteResource *MakeNoteResource( const RString &sButton, const RString &sE map::iterator it = g_NoteResource.find( nsap ); if( it == g_NoteResource.end() ) { - NoteResource *pRes = smnew NoteResource( nsap ); + NoteResource *pRes = new NoteResource( nsap ); pRes->m_pActor = NOTESKIN->LoadActor( sButton, sElement, NULL, bSpriteOnly ); ASSERT( pRes->m_pActor != NULL ); @@ -233,7 +233,7 @@ XToString( ActiveType ); NoteDisplay::NoteDisplay() { - cache = smnew NoteMetricCache_t; + cache = new NoteMetricCache_t; } NoteDisplay::~NoteDisplay() diff --git a/src/NoteField.cpp b/src/NoteField.cpp index 024f866e59..d68f238ed2 100644 --- a/src/NoteField.cpp +++ b/src/NoteField.cpp @@ -92,7 +92,7 @@ void NoteField::CacheNoteSkin( const RString &sNoteSkin_ ) LockNoteSkin l( sNoteSkinLower ); LOG->Trace("NoteField::CacheNoteSkin: cache %s", sNoteSkinLower.c_str() ); - NoteDisplayCols *nd = smnew NoteDisplayCols( GAMESTATE->GetCurrentStyle()->m_iColsPerPlayer ); + NoteDisplayCols *nd = new NoteDisplayCols( GAMESTATE->GetCurrentStyle()->m_iColsPerPlayer ); for( int c=0; cGetCurrentStyle()->m_iColsPerPlayer; c++ ) nd->display[c].Load( c, m_pPlayerState, m_fYReverseOffsetPixels ); diff --git a/src/NoteField.h b/src/NoteField.h index 2afcf1de52..f37023b2db 100644 --- a/src/NoteField.h +++ b/src/NoteField.h @@ -87,7 +87,7 @@ protected: NoteDisplay *display; ReceptorArrowRow m_ReceptorArrowRow; GhostArrowRow m_GhostArrowRow; - NoteDisplayCols( int iNumCols ) { display = smnew NoteDisplay[iNumCols]; } + NoteDisplayCols( int iNumCols ) { display = new NoteDisplay[iNumCols]; } ~NoteDisplayCols() { delete [] display; } }; diff --git a/src/NoteSkinManager.cpp b/src/NoteSkinManager.cpp index 31e11c1a6c..ec67bbaf4f 100644 --- a/src/NoteSkinManager.cpp +++ b/src/NoteSkinManager.cpp @@ -401,14 +401,14 @@ Actor *NoteSkinManager::LoadActor( const RString &sButton, const RString &sEleme if( !PushActorTemplate(L, sButton, sElement, bSpriteOnly) ) { // ActorUtil will warn about the error - return smnew Actor; + return new Actor; } auto_ptr pNode( XmlFileUtil::XNodeFromTable(L) ); if( pNode.get() == NULL ) { // XNode will warn about the error - return smnew Actor; + return new Actor; } LUA->Release( L ); diff --git a/src/NoteTypes.cpp b/src/NoteTypes.cpp index a0a84e6932..dd5f62e3e9 100644 --- a/src/NoteTypes.cpp +++ b/src/NoteTypes.cpp @@ -123,7 +123,7 @@ bool IsNoteOfType( int row, NoteType t ) XNode* TapNoteResult::CreateNode() const { - XNode *p = smnew XNode( "TapNoteResult" ); + XNode *p = new XNode( "TapNoteResult" ); p->AppendAttr( "TapNoteScore", TapNoteScoreToString(tns) ); p->AppendAttr( "TapNoteOffset", fTapNoteOffset ); @@ -139,7 +139,7 @@ void TapNoteResult::LoadFromNode( const XNode* pNode ) XNode* HoldNoteResult::CreateNode() const { // XXX: Should this do anything? - return smnew XNode( "HoldNoteResult" ); + return new XNode( "HoldNoteResult" ); } void HoldNoteResult::LoadFromNode( const XNode* pNode ) @@ -149,7 +149,7 @@ void HoldNoteResult::LoadFromNode( const XNode* pNode ) XNode* TapNote::CreateNode() const { - XNode *p = smnew XNode( "TapNote" ); + XNode *p = new XNode( "TapNote" ); p->AppendChild( result.CreateNode() ); p->AppendChild( HoldResult.CreateNode() ); diff --git a/src/NotesLoaderBMS.cpp b/src/NotesLoaderBMS.cpp index 43579feb41..ef49a5130c 100644 --- a/src/NotesLoaderBMS.cpp +++ b/src/NotesLoaderBMS.cpp @@ -695,9 +695,9 @@ bool BMSChartReader::ReadNoteData() td.SetBPMAtRow( 0, currentBPM = initialBPM ); // set up note transformation vector. - int *transform = smnew int[tracks]; - int *holdStart = smnew int[tracks]; - int *lastNote = smnew int[tracks]; + int *transform = new int[tracks]; + int *holdStart = new int[tracks]; + int *lastNote = new int[tracks]; for( int i = 0; i < tracks; i ++ ) holdStart[i] = -1; for( int i = 0; i < tracks; i ++ ) lastNote[i] = -1; diff --git a/src/NotesLoaderSMA.cpp b/src/NotesLoaderSMA.cpp index 438f5f82db..43d5d08b50 100644 --- a/src/NotesLoaderSMA.cpp +++ b/src/NotesLoaderSMA.cpp @@ -301,7 +301,7 @@ bool SMALoader::LoadFromSimfile( const RString &sPath, Song &out, bool bFromCach else { state = SMA_GETTING_STEP_INFO; - pNewNotes = smnew Steps(&out); + pNewNotes = new Steps(&out); } } diff --git a/src/OptionRow.cpp b/src/OptionRow.cpp index fff244cc0a..f97c249206 100644 --- a/src/OptionRow.cpp +++ b/src/OptionRow.cpp @@ -243,7 +243,7 @@ void OptionRow::InitText( RowType type ) FOREACH_PlayerNumber( p ) m_Underline[p].clear(); - m_textTitle = smnew BitmapText( m_pParentType->m_textTitle ); + m_textTitle = new BitmapText( m_pParentType->m_textTitle ); m_Frame.AddChild( m_textTitle ); m_sprFrame = m_pParentType->m_sprFrame->Copy(); @@ -257,7 +257,7 @@ void OptionRow::InitText( RowType type ) case RowType_Normal: FOREACH_PlayerNumber( p ) { - m_ModIcons[p] = smnew ModIcon( m_pParentType->m_ModIcon ); + m_ModIcons[p] = new ModIcon( m_pParentType->m_ModIcon ); m_ModIcons[p]->SetDrawOrder(-1); // under title m_ModIcons[p]->PlayCommand( "On" ); @@ -310,7 +310,7 @@ void OptionRow::InitText( RowType type ) // init text FOREACH_PlayerNumber( p ) { - BitmapText *pText = smnew BitmapText( m_pParentType->m_textItem ); + BitmapText *pText = new BitmapText( m_pParentType->m_textItem ); m_textItems.push_back( pText ); pText->PlayCommand( "On" ); @@ -331,7 +331,7 @@ void OptionRow::InitText( RowType type ) // init underlines if( m_pParentType->SHOW_UNDERLINES && GetRowType() != OptionRow::RowType_Exit ) { - OptionsCursor *pCursor = smnew OptionsCursor( m_pParentType->m_Underline[p] ); + OptionsCursor *pCursor = new OptionsCursor( m_pParentType->m_Underline[p] ); m_Underline[p].push_back( pCursor ); int iWidth, iX, iY; @@ -348,7 +348,7 @@ void OptionRow::InitText( RowType type ) for( unsigned c=0; cm_Def.m_vsChoices.size(); c++ ) { // init text - BitmapText *bt = smnew BitmapText( m_pParentType->m_textItem ); + BitmapText *bt = new BitmapText( m_pParentType->m_textItem ); m_textItems.push_back( bt ); bt->SetBaseZoomX( fBaseZoom ); bt->PlayCommand( "On" ); @@ -366,7 +366,7 @@ void OptionRow::InitText( RowType type ) { FOREACH_PlayerNumber( p ) { - OptionsCursor *ul = smnew OptionsCursor( m_pParentType->m_Underline[p] ); + OptionsCursor *ul = new OptionsCursor( m_pParentType->m_Underline[p] ); m_Underline[p].push_back( ul ); ul->SetX( fX ); ul->SetBarWidth( int(fItemWidth) ); diff --git a/src/OptionRowHandler.cpp b/src/OptionRowHandler.cpp index 97061d6886..01f0d32fc9 100644 --- a/src/OptionRowHandler.cpp +++ b/src/OptionRowHandler.cpp @@ -809,7 +809,7 @@ public: LuaReference *m_pLuaTable; LuaReference m_EnabledForPlayersFunc; - OptionRowHandlerLua() { m_pLuaTable = smnew LuaReference; Init(); } + OptionRowHandlerLua() { m_pLuaTable = new LuaReference; Init(); } virtual ~OptionRowHandlerLua() { delete m_pLuaTable; } void Init() { @@ -1336,7 +1336,7 @@ OptionRowHandler* OptionRowHandlerUtil::Make( const Commands &cmds ) const RString &name = cmds.v[0].GetName(); -#define MAKE( type ) { type *p = smnew type; p->Load( cmds ); pHand = p; } +#define MAKE( type ) { type *p = new type; p->Load( cmds ); pHand = p; } // XXX: merge these, and merge "Steps" and "list,Steps" if( name == "list" ) diff --git a/src/Player.cpp b/src/Player.cpp index b528860e24..547a62d3b9 100644 --- a/src/Player.cpp +++ b/src/Player.cpp @@ -246,7 +246,7 @@ Player::Player( NoteData &nd, bool bVisibleParts ) : m_NoteData(nd) m_pAttackDisplay = NULL; if( bVisibleParts ) { - m_pAttackDisplay = smnew AttackDisplay; + m_pAttackDisplay = new AttackDisplay; this->AddChild( m_pAttackDisplay ); } @@ -255,10 +255,10 @@ Player::Player( NoteData &nd, bool bVisibleParts ) : m_NoteData(nd) m_pNoteField = NULL; if( bVisibleParts ) { - m_pNoteField = smnew NoteField; + m_pNoteField = new NoteField; m_pNoteField->SetName( "NoteField" ); } - m_pJudgedRows = smnew JudgedRows; + m_pJudgedRows = new JudgedRows; m_bSendJudgmentAndComboMessages = true; } @@ -517,7 +517,7 @@ void Player::Init( { for( int i = 0; i < GAMESTATE->GetCurrentStyle()->m_iColsPerPlayer; ++i ) { - HoldJudgment *pJudgment = smnew HoldJudgment; + HoldJudgment *pJudgment = new HoldJudgment; // xxx: assumes sprite; todo: don't force 1x2 -aj pJudgment->Load( THEME->GetPathG("HoldJudgment","label 1x2") ); m_vpHoldJudgment[i] = pJudgment; @@ -754,19 +754,19 @@ void Player::Load() SendComboMessages( m_pPlayerStageStats->m_iCurCombo, m_pPlayerStageStats->m_iCurMissCombo ); SAFE_DELETE( m_pIterNeedsTapJudging ); - m_pIterNeedsTapJudging = smnew NoteData::all_tracks_iterator( m_NoteData.GetTapNoteRangeAllTracks(iNoteRow, MAX_NOTE_ROW) ); + m_pIterNeedsTapJudging = new NoteData::all_tracks_iterator( m_NoteData.GetTapNoteRangeAllTracks(iNoteRow, MAX_NOTE_ROW) ); SAFE_DELETE( m_pIterNeedsHoldJudging ); - m_pIterNeedsHoldJudging = smnew NoteData::all_tracks_iterator( m_NoteData.GetTapNoteRangeAllTracks(iNoteRow, MAX_NOTE_ROW ) ); + m_pIterNeedsHoldJudging = new NoteData::all_tracks_iterator( m_NoteData.GetTapNoteRangeAllTracks(iNoteRow, MAX_NOTE_ROW ) ); SAFE_DELETE( m_pIterUncrossedRows ); - m_pIterUncrossedRows = smnew NoteData::all_tracks_iterator( m_NoteData.GetTapNoteRangeAllTracks(iNoteRow, MAX_NOTE_ROW ) ); + m_pIterUncrossedRows = new NoteData::all_tracks_iterator( m_NoteData.GetTapNoteRangeAllTracks(iNoteRow, MAX_NOTE_ROW ) ); SAFE_DELETE( m_pIterUnjudgedRows ); - m_pIterUnjudgedRows = smnew NoteData::all_tracks_iterator( m_NoteData.GetTapNoteRangeAllTracks(iNoteRow, MAX_NOTE_ROW ) ); + m_pIterUnjudgedRows = new NoteData::all_tracks_iterator( m_NoteData.GetTapNoteRangeAllTracks(iNoteRow, MAX_NOTE_ROW ) ); SAFE_DELETE( m_pIterUnjudgedMineRows ); - m_pIterUnjudgedMineRows = smnew NoteData::all_tracks_iterator( m_NoteData.GetTapNoteRangeAllTracks(iNoteRow, MAX_NOTE_ROW ) ); + m_pIterUnjudgedMineRows = new NoteData::all_tracks_iterator( m_NoteData.GetTapNoteRangeAllTracks(iNoteRow, MAX_NOTE_ROW ) ); } void Player::SendComboMessages( int iOldCombo, int iOldMissCombo ) diff --git a/src/Player.h b/src/Player.h index bfe339f11c..df5ee9e081 100644 --- a/src/Player.h +++ b/src/Player.h @@ -234,7 +234,7 @@ class PlayerPlus Player *m_pPlayer; NoteData m_NoteData; public: - PlayerPlus() { m_pPlayer = smnew Player(m_NoteData); } + PlayerPlus() { m_pPlayer = new Player(m_NoteData); } ~PlayerPlus() { delete m_pPlayer; } void Load( const NoteData &nd ) { m_NoteData = nd; m_pPlayer->Load(); } Player *operator->() { return m_pPlayer; } diff --git a/src/Preference.h b/src/Preference.h index b6b1696811..a1f7cc6186 100644 --- a/src/Preference.h +++ b/src/Preference.h @@ -138,7 +138,7 @@ public: RString sName; T defaultValue; pfn( i, sName, defaultValue ); - m_v.push_back( smnew Preference(sName, defaultValue) ); + m_v.push_back( new Preference(sName, defaultValue) ); } } diff --git a/src/Profile.cpp b/src/Profile.cpp index 3011c1ead5..ce200ed9e2 100644 --- a/src/Profile.cpp +++ b/src/Profile.cpp @@ -940,7 +940,7 @@ bool Profile::SaveAllToDir( RString sDir, bool bSignData ) const XNode *Profile::SaveStatsXmlCreateNode() const { - XNode *xml = smnew XNode( "Stats" ); + XNode *xml = new XNode( "Stats" ); xml->AppendChild( SaveGeneralDataCreateNode() ); xml->AppendChild( SaveSongScoresCreateNode() ); @@ -1023,7 +1023,7 @@ void Profile::SaveEditableDataToDir( RString sDir ) const XNode* Profile::SaveGeneralDataCreateNode() const { - XNode* pGeneralDataNode = smnew XNode( "GeneralData" ); + XNode* pGeneralDataNode = new XNode( "GeneralData" ); // TRICKY: These are write-only elements that are normally never read again. // This data is required by other apps (like internet ranking), but is @@ -1384,7 +1384,7 @@ XNode* Profile::SaveSongScoresCreateNode() const const Profile* pProfile = this; ASSERT( pProfile != NULL ); - XNode* pNode = smnew XNode( "SongScores" ); + XNode* pNode = new XNode( "SongScores" ); FOREACHM_CONST( SongID, HighScoresForASong, m_SongHighScores, i ) { @@ -1465,7 +1465,7 @@ XNode* Profile::SaveCourseScoresCreateNode() const const Profile* pProfile = this; ASSERT( pProfile != NULL ); - XNode* pNode = smnew XNode( "CourseScores" ); + XNode* pNode = new XNode( "CourseScores" ); FOREACHM_CONST( CourseID, HighScoresForACourse, m_CourseHighScores, i ) { @@ -1573,7 +1573,7 @@ XNode* Profile::SaveCategoryScoresCreateNode() const const Profile* pProfile = this; ASSERT( pProfile != NULL ); - XNode* pNode = smnew XNode( "CategoryScores" ); + XNode* pNode = new XNode( "CategoryScores" ); FOREACH_ENUM( StepsType,st ) { @@ -1681,7 +1681,7 @@ XNode* Profile::SaveScreenshotDataCreateNode() const const Profile* pProfile = this; ASSERT( pProfile != NULL ); - XNode* pNode = smnew XNode( "ScreenshotData" ); + XNode* pNode = new XNode( "ScreenshotData" ); FOREACH_CONST( Screenshot, m_vScreenshots, ss ) { @@ -1723,7 +1723,7 @@ XNode* Profile::SaveCalorieDataCreateNode() const const Profile* pProfile = this; ASSERT( pProfile != NULL ); - XNode* pNode = smnew XNode( "CalorieData" ); + XNode* pNode = new XNode( "CalorieData" ); FOREACHM_CONST( DateTime, Calories, m_mapDayToCaloriesBurned, i ) { @@ -1760,7 +1760,7 @@ static void SaveRecentScore( XNode* xml ) XNode* Profile::HighScoreForASongAndSteps::CreateNode() const { - XNode* pNode = smnew XNode( "HighScoreForASongAndSteps" ); + XNode* pNode = new XNode( "HighScoreForASongAndSteps" ); pNode->AppendChild( songID.CreateNode() ); pNode->AppendChild( stepsID.CreateNode() ); @@ -1780,9 +1780,9 @@ void Profile::SaveStepsRecentScore( const Song* pSong, const Steps* pSteps, High ASSERT( h.stepsID.IsValid() ); h.hs = hs; - auto_ptr xml( smnew XNode("Stats") ); + auto_ptr xml( new XNode("Stats") ); xml->AppendChild( "MachineGuid", PROFILEMAN->GetMachineProfile()->m_sGuid ); - XNode *recent = xml->AppendChild( smnew XNode("RecentSongScores") ); + XNode *recent = xml->AppendChild( new XNode("RecentSongScores") ); recent->AppendChild( h.CreateNode() ); SaveRecentScore( xml.get() ); @@ -1791,7 +1791,7 @@ void Profile::SaveStepsRecentScore( const Song* pSong, const Steps* pSteps, High XNode* Profile::HighScoreForACourseAndTrail::CreateNode() const { - XNode* pNode = smnew XNode( "HighScoreForACourseAndTrail" ); + XNode* pNode = new XNode( "HighScoreForACourseAndTrail" ); pNode->AppendChild( courseID.CreateNode() ); pNode->AppendChild( trailID.CreateNode() ); @@ -1807,9 +1807,9 @@ void Profile::SaveCourseRecentScore( const Course* pCourse, const Trail* pTrail, h.trailID.FromTrail( pTrail ); h.hs = hs; - auto_ptr xml( smnew XNode("Stats") ); + auto_ptr xml( new XNode("Stats") ); xml->AppendChild( "MachineGuid", PROFILEMAN->GetMachineProfile()->m_sGuid ); - XNode *recent = xml->AppendChild( smnew XNode("RecentCourseScores") ); + XNode *recent = xml->AppendChild( new XNode("RecentCourseScores") ); recent->AppendChild( h.CreateNode() ); SaveRecentScore( xml.get() ); } @@ -1846,7 +1846,7 @@ XNode* Profile::SaveCoinDataCreateNode() const const Profile* pProfile = this; ASSERT( pProfile != NULL ); - XNode* pNode = smnew XNode( "CoinData" ); + XNode* pNode = new XNode( "CoinData" ); return pNode; } diff --git a/src/ProfileManager.cpp b/src/ProfileManager.cpp index 509ca124a2..ecf59bb9c2 100644 --- a/src/ProfileManager.cpp +++ b/src/ProfileManager.cpp @@ -65,9 +65,9 @@ static ThemeMetric NUM_FIXED_PROFILES ( "ProfileManager", "NumFixedProfile ProfileManager::ProfileManager() { - m_pMachineProfile = smnew Profile; + m_pMachineProfile = new Profile; FOREACH_PlayerNumber(pn) - m_pMemoryCardProfile[pn] = smnew Profile; + m_pMemoryCardProfile[pn] = new Profile; // Register with Lua. { @@ -435,7 +435,7 @@ bool ProfileManager::CreateLocalProfile( RString sName, RString &sProfileIDOut ) RString sProfileID = ssprintf( "%08d", iProfileNumber ); // Create the new profile. - Profile *pProfile = smnew Profile; + Profile *pProfile = new Profile; pProfile->m_sDisplayName = sName; pProfile->m_sCharacterID = CHARMAN->GetRandomCharacter()->m_sCharacterID; diff --git a/src/RadarValues.cpp b/src/RadarValues.cpp index a5db1f5f6a..5181d64af5 100644 --- a/src/RadarValues.cpp +++ b/src/RadarValues.cpp @@ -27,7 +27,7 @@ void RadarValues::Zero() XNode* RadarValues::CreateNode( bool bIncludeSimpleValues, bool bIncludeComplexValues ) const { - XNode* pNode = smnew XNode( "RadarValues" ); + XNode* pNode = new XNode( "RadarValues" ); // TRICKY: Don't print a remainder for the integer values. FOREACH_ENUM( RadarCategory, rc ) diff --git a/src/RageDisplay_D3D.cpp b/src/RageDisplay_D3D.cpp index c2aa6944a8..e97865f5fd 100644 --- a/src/RageDisplay_D3D.cpp +++ b/src/RageDisplay_D3D.cpp @@ -807,7 +807,7 @@ protected: RageCompiledGeometry* RageDisplay_D3D::CreateCompiledGeometry() { - return smnew RageCompiledGeometrySWD3D; + return new RageCompiledGeometrySWD3D; } void RageDisplay_D3D::DeleteCompiledGeometry( RageCompiledGeometry* p ) diff --git a/src/RageDisplay_Null.cpp b/src/RageDisplay_Null.cpp index efa5ade57e..16d8fd7607 100644 --- a/src/RageDisplay_Null.cpp +++ b/src/RageDisplay_Null.cpp @@ -135,7 +135,7 @@ public: RageCompiledGeometry* RageDisplay_Null::CreateCompiledGeometry() { - return smnew RageCompiledGeometryNull; + return new RageCompiledGeometryNull; } void RageDisplay_Null::DeleteCompiledGeometry( RageCompiledGeometry* p ) diff --git a/src/RageDisplay_OGL.cpp b/src/RageDisplay_OGL.cpp index b9708e09cc..41fe31c823 100644 --- a/src/RageDisplay_OGL.cpp +++ b/src/RageDisplay_OGL.cpp @@ -273,7 +273,7 @@ RString GetInfoLog( GLhandleARB h ) if (!iLength) return RString(); - GLcharARB *pInfoLog = smnew GLcharARB[iLength]; + GLcharARB *pInfoLog = new GLcharARB[iLength]; glGetInfoLogARB( h, iLength, &iLength, pInfoLog ); RString sRet = pInfoLog; delete [] pInfoLog; @@ -873,10 +873,10 @@ static void SetupVertices( const RageSpriteVertex v[], int iNumVerts ) delete [] Color; delete [] Texture; delete [] Normal; - Vertex = smnew float[Size*3]; - Color = smnew GLubyte[Size*4]; - Texture = smnew float[Size*2]; - Normal = smnew float[Size*3]; + Vertex = new float[Size*3]; + Color = new GLubyte[Size*4]; + Texture = new float[Size*2]; + Normal = new float[Size*3]; } for( unsigned i = 0; i < unsigned(iNumVerts); ++i ) @@ -1380,9 +1380,9 @@ void RageCompiledGeometryHWOGL::Draw( int iMeshIndex ) const RageCompiledGeometry* RageDisplay_Legacy::CreateCompiledGeometry() { if (GLEW_ARB_vertex_buffer_object) - return smnew RageCompiledGeometryHWOGL; + return new RageCompiledGeometryHWOGL; else - return smnew RageCompiledGeometrySWOGL; + return new RageCompiledGeometrySWOGL; } void RageDisplay_Legacy::DeleteCompiledGeometry( RageCompiledGeometry* p ) @@ -2279,7 +2279,7 @@ RageTextureLock *RageDisplay_Legacy::CreateTextureLock() if (!GLEW_ARB_pixel_buffer_object) return NULL; - return smnew RageTextureLock_OGL; + return new RageTextureLock_OGL; } void RageDisplay_Legacy::UpdateTexture( @@ -2452,7 +2452,7 @@ unsigned RageDisplay_Legacy::CreateRenderTarget( const RenderTargetParam ¶m, { RenderTarget *pTarget; if (GLEW_EXT_framebuffer_object) - pTarget = smnew RenderTarget_FramebufferObject; + pTarget = new RenderTarget_FramebufferObject; else pTarget = g_pWind->CreateRenderTarget(); diff --git a/src/RageFile.cpp b/src/RageFile.cpp index a7a84591a9..72d110634f 100644 --- a/src/RageFile.cpp +++ b/src/RageFile.cpp @@ -27,7 +27,7 @@ RageFile::RageFile( const RageFile &cpy ): RageFile *RageFile::Copy() const { - return smnew RageFile( *this ); + return new RageFile( *this ); } RString RageFile::GetPath() const @@ -430,7 +430,7 @@ namespace RageFileUtil { int CreateRageFile( lua_State *L ) { - RageFile *pFile = smnew RageFile; + RageFile *pFile = new RageFile; pFile->PushSelf( L ); return 1; } diff --git a/src/RageFileBasic.cpp b/src/RageFileBasic.cpp index 33f94ee26c..8dce779506 100644 --- a/src/RageFileBasic.cpp +++ b/src/RageFileBasic.cpp @@ -27,7 +27,7 @@ RageFileObj::RageFileObj( const RageFileObj &cpy ): /* If the original file has a buffer, copy it. */ if( cpy.m_pReadBuffer != NULL ) { - m_pReadBuffer = smnew char[BSIZE]; + m_pReadBuffer = new char[BSIZE]; memcpy( m_pReadBuffer, cpy.m_pReadBuffer, BSIZE ); int iOffsetIntoBuffer = cpy.m_pReadBuf - cpy.m_pReadBuffer; @@ -40,7 +40,7 @@ RageFileObj::RageFileObj( const RageFileObj &cpy ): if( cpy.m_pWriteBuffer != NULL ) { - m_pWriteBuffer = smnew char[cpy.m_iWriteBufferSize]; + m_pWriteBuffer = new char[cpy.m_iWriteBufferSize]; memcpy( m_pWriteBuffer, cpy.m_pWriteBuffer, m_iWriteBufferUsed ); } else @@ -286,14 +286,14 @@ int RageFileObj::Flush() void RageFileObj::EnableReadBuffering() { if( m_pReadBuffer == NULL ) - m_pReadBuffer = smnew char[BSIZE]; + m_pReadBuffer = new char[BSIZE]; } void RageFileObj::EnableWriteBuffering( int iBytes ) { if( m_pWriteBuffer == NULL ) { - m_pWriteBuffer = smnew char[iBytes]; + m_pWriteBuffer = new char[iBytes]; m_iWriteBufferPos = m_iFilePos; m_iWriteBufferSize = iBytes; } diff --git a/src/RageFileDriverDeflate.cpp b/src/RageFileDriverDeflate.cpp index 3326986907..45f834e201 100644 --- a/src/RageFileDriverDeflate.cpp +++ b/src/RageFileDriverDeflate.cpp @@ -22,7 +22,7 @@ RageFileObjInflate::RageFileObjInflate( RageFileBasic *pFile, int iUncompressedS m_bFileOwned = false; m_pFile = pFile; decomp_buf_avail = 0; - m_pInflate = smnew z_stream; + m_pInflate = new z_stream; memset( m_pInflate, 0, sizeof(z_stream) ); m_iUncompressedSize = iUncompressedSize; @@ -44,7 +44,7 @@ RageFileObjInflate::RageFileObjInflate( const RageFileObjInflate &cpy ): /* Copy the entire decode state. */ m_pFile = cpy.m_pFile->Copy(); m_bFileOwned = true; - m_pInflate = smnew z_stream; + m_pInflate = new z_stream; m_iUncompressedSize = cpy.m_iUncompressedSize; m_iFilePos = cpy.m_iFilePos; inflateCopy( m_pInflate, const_cast(cpy.m_pInflate) ); @@ -56,7 +56,7 @@ RageFileObjInflate::RageFileObjInflate( const RageFileObjInflate &cpy ): RageFileObjInflate *RageFileObjInflate::Copy() const { - return smnew RageFileObjInflate( *this ); + return new RageFileObjInflate( *this ); } @@ -186,7 +186,7 @@ RageFileObjDeflate::RageFileObjDeflate( RageFileBasic *pFile ) m_pFile = pFile; m_bFileOwned = false; - m_pDeflate = smnew z_stream; + m_pDeflate = new z_stream; memset( m_pDeflate, 0, sizeof(z_stream) ); int err = deflateInit2( m_pDeflate, @@ -408,9 +408,9 @@ RageFileObjInflate *GunzipFile( RageFileBasic *pFile_, RString &sError, uint32_t if( sError != "" ) return NULL; - RageFileDriverSlice *pSliceFile = smnew RageFileDriverSlice( pFile.release(), iDataPos, iFooterPos-iDataPos ); + RageFileDriverSlice *pSliceFile = new RageFileDriverSlice( pFile.release(), iDataPos, iFooterPos-iDataPos ); pSliceFile->DeleteFileWhenFinished(); - RageFileObjInflate *pInflateFile = smnew RageFileObjInflate( pSliceFile, iUncompressedSize ); + RageFileObjInflate *pInflateFile = new RageFileObjInflate( pSliceFile, iUncompressedSize ); pInflateFile->DeleteFileWhenFinished(); /* Enable CRC calculation only if the caller is interested. */ @@ -517,7 +517,7 @@ void GzipString( const RString &sIn, RString &sOut ) bool GunzipString( const RString &sIn, RString &sOut, RString &sError ) { - RageFileObjMem *mem = smnew RageFileObjMem; + RageFileObjMem *mem = new RageFileObjMem; mem->PutString( sIn ); uint32_t iCRC32; diff --git a/src/RageFileDriverDirect.cpp b/src/RageFileDriverDirect.cpp index 660cba4a09..b9be858378 100644 --- a/src/RageFileDriverDirect.cpp +++ b/src/RageFileDriverDirect.cpp @@ -24,18 +24,18 @@ static struct FileDriverEntry_DIR: public FileDriverEntry { FileDriverEntry_DIR(): FileDriverEntry( "DIR" ) { } - RageFileDriver *Create( const RString &sRoot ) const { return smnew RageFileDriverDirect( sRoot ); } + RageFileDriver *Create( const RString &sRoot ) const { return new RageFileDriverDirect( sRoot ); } } const g_RegisterDriver; /* Direct read-only filesystem access: */ static struct FileDriverEntry_DIRRO: public FileDriverEntry { FileDriverEntry_DIRRO(): FileDriverEntry( "DIRRO" ) { } - RageFileDriver *Create( const RString &sRoot ) const { return smnew RageFileDriverDirectReadOnly( sRoot ); } + RageFileDriver *Create( const RString &sRoot ) const { return new RageFileDriverDirectReadOnly( sRoot ); } } const g_RegisterDriver2; RageFileDriverDirect::RageFileDriverDirect( const RString &sRoot ): - RageFileDriver( smnew DirectFilenameDB(sRoot) ) + RageFileDriver( new DirectFilenameDB(sRoot) ) { Remount( sRoot ); } @@ -89,7 +89,7 @@ static RageFileObjDirect *MakeFileObjDirect( RString sPath, int iMode, int &iErr } #endif - return smnew RageFileObjDirect( sPath, iFD, iMode ); + return new RageFileObjDirect( sPath, iFD, iMode ); } RageFileBasic *RageFileDriverDirect::Open( const RString &sPath_, int iMode, int &iError ) diff --git a/src/RageFileDriverMemory.cpp b/src/RageFileDriverMemory.cpp index b19b8cbfaa..c8b5a5e5c7 100644 --- a/src/RageFileDriverMemory.cpp +++ b/src/RageFileDriverMemory.cpp @@ -37,7 +37,7 @@ struct RageFileObjMemFile RageFileObjMem::RageFileObjMem( RageFileObjMemFile *pFile ) { if( pFile == NULL ) - pFile = smnew RageFileObjMemFile; + pFile = new RageFileObjMemFile; m_pFile = pFile; m_iFilePos = 0; @@ -95,7 +95,7 @@ RageFileObjMem::RageFileObjMem( const RageFileObjMem &cpy ): RageFileObjMem *RageFileObjMem::Copy() const { - RageFileObjMem *pRet = smnew RageFileObjMem( *this ); + RageFileObjMem *pRet = new RageFileObjMem( *this ); return pRet; } @@ -112,7 +112,7 @@ void RageFileObjMem::PutString( const RString &sBuf ) } RageFileDriverMem::RageFileDriverMem(): - RageFileDriver( smnew NullFilenameDB ), + RageFileDriver( new NullFilenameDB ), m_Mutex("RageFileDriverMem") { } @@ -135,7 +135,7 @@ RageFileBasic *RageFileDriverMem::Open( const RString &sPath, int mode, int &err /* If the file exists, delete it. */ Remove( sPath ); - RageFileObjMemFile *pFile = smnew RageFileObjMemFile; + RageFileObjMemFile *pFile = new RageFileObjMemFile; /* Add one reference, representing the file in the filesystem. */ RageFileObjMemFile::AddReference( pFile ); @@ -143,7 +143,7 @@ RageFileBasic *RageFileDriverMem::Open( const RString &sPath, int mode, int &err m_Files.push_back( pFile ); FDB->AddFile( sPath, 0, 0, pFile ); - return smnew RageFileObjMem( pFile ); + return new RageFileObjMem( pFile ); } RageFileObjMemFile *pFile = (RageFileObjMemFile *) FDB->GetFilePriv( sPath ); @@ -153,7 +153,7 @@ RageFileBasic *RageFileDriverMem::Open( const RString &sPath, int mode, int &err return NULL; } - return smnew RageFileObjMem( pFile ); + return new RageFileObjMem( pFile ); } bool RageFileDriverMem::Remove( const RString &sPath ) @@ -178,7 +178,7 @@ bool RageFileDriverMem::Remove( const RString &sPath ) static struct FileDriverEntry_MEM: public FileDriverEntry { FileDriverEntry_MEM(): FileDriverEntry( "MEM" ) { } - RageFileDriver *Create( const RString &sRoot ) const { return smnew RageFileDriverMem(); } + RageFileDriver *Create( const RString &sRoot ) const { return new RageFileDriverMem(); } } const g_RegisterDriver; /* diff --git a/src/RageFileDriverReadAhead.cpp b/src/RageFileDriverReadAhead.cpp index f107499060..098acc29ac 100644 --- a/src/RageFileDriverReadAhead.cpp +++ b/src/RageFileDriverReadAhead.cpp @@ -90,7 +90,7 @@ RageFileDriverReadAhead::~RageFileDriverReadAhead() RageFileDriverReadAhead *RageFileDriverReadAhead::Copy() const { - RageFileDriverReadAhead *pRet = smnew RageFileDriverReadAhead( *this ); + RageFileDriverReadAhead *pRet = new RageFileDriverReadAhead( *this ); return pRet; } diff --git a/src/RageFileDriverSlice.cpp b/src/RageFileDriverSlice.cpp index c8321269d7..157941505b 100644 --- a/src/RageFileDriverSlice.cpp +++ b/src/RageFileDriverSlice.cpp @@ -28,7 +28,7 @@ RageFileDriverSlice::~RageFileDriverSlice() RageFileDriverSlice *RageFileDriverSlice::Copy() const { - RageFileDriverSlice *pRet = smnew RageFileDriverSlice( *this ); + RageFileDriverSlice *pRet = new RageFileDriverSlice( *this ); return pRet; } diff --git a/src/RageFileDriverTimeout.cpp b/src/RageFileDriverTimeout.cpp index 725889a343..b2c8003c31 100644 --- a/src/RageFileDriverTimeout.cpp +++ b/src/RageFileDriverTimeout.cpp @@ -461,7 +461,7 @@ int ThreadedFileWorker::Read( RageFileBasic *&pFile, void *pBuf, int iSize, RStr m_pRequestFile = pFile; m_iRequestSize = iSize; - m_pResultBuffer = smnew char[iSize]; + m_pResultBuffer = new char[iSize]; if( !DoRequest(REQ_READ) ) { @@ -503,7 +503,7 @@ int ThreadedFileWorker::Write( RageFileBasic *&pFile, const void *pBuf, int iSiz m_pRequestFile = pFile; m_iRequestSize = iSize; - m_pRequestBuffer = smnew char[iSize]; + m_pRequestBuffer = new char[iSize]; memcpy( m_pRequestBuffer, pBuf, iSize ); if( !DoRequest(REQ_WRITE) ) @@ -756,7 +756,7 @@ public: return NULL; } - return smnew RageFileObjTimeout( m_pWorker, pCopy, m_iFileSize, m_iMode ); + return new RageFileObjTimeout( m_pWorker, pCopy, m_iFileSize, m_iMode ); } protected: @@ -868,9 +868,9 @@ private: }; RageFileDriverTimeout::RageFileDriverTimeout( const RString &sPath ): - RageFileDriver( smnew TimedFilenameDB() ) + RageFileDriver( new TimedFilenameDB() ) { - m_pWorker = smnew ThreadedFileWorker( sPath ); + m_pWorker = new ThreadedFileWorker( sPath ); ((TimedFilenameDB *) FDB)->SetWorker( m_pWorker ); } @@ -896,7 +896,7 @@ RageFileBasic *RageFileDriverTimeout::Open( const RString &sPath, int iMode, int } } - return smnew RageFileObjTimeout( m_pWorker, pChildFile, iSize, iMode ); + return new RageFileObjTimeout( m_pWorker, pChildFile, iSize, iMode ); } void RageFileDriverTimeout::FlushDirCache( const RString &sPath ) @@ -937,7 +937,7 @@ RageFileDriverTimeout::~RageFileDriverTimeout() static struct FileDriverEntry_Timeout: public FileDriverEntry { FileDriverEntry_Timeout(): FileDriverEntry( "TIMEOUT" ) { } - RageFileDriver *Create( const RString &sRoot ) const { return smnew RageFileDriverTimeout( sRoot ); } + RageFileDriver *Create( const RString &sRoot ) const { return new RageFileDriverTimeout( sRoot ); } } const g_RegisterDriver; /* diff --git a/src/RageFileDriverZip.cpp b/src/RageFileDriverZip.cpp index 98194a5f57..e223490240 100644 --- a/src/RageFileDriverZip.cpp +++ b/src/RageFileDriverZip.cpp @@ -15,12 +15,12 @@ static struct FileDriverEntry_ZIP: public FileDriverEntry { FileDriverEntry_ZIP(): FileDriverEntry( "ZIP" ) { } - RageFileDriver *Create( const RString &sRoot ) const { return smnew RageFileDriverZip( sRoot ); } + RageFileDriver *Create( const RString &sRoot ) const { return new RageFileDriverZip( sRoot ); } } const g_RegisterDriver; RageFileDriverZip::RageFileDriverZip(): - RageFileDriver( smnew NullFilenameDB ), + RageFileDriver( new NullFilenameDB ), m_Mutex( "RageFileDriverZip" ) { m_bFileOwned = false; @@ -28,7 +28,7 @@ RageFileDriverZip::RageFileDriverZip(): } RageFileDriverZip::RageFileDriverZip( const RString &sPath ): - RageFileDriver( smnew NullFilenameDB ), + RageFileDriver( new NullFilenameDB ), m_Mutex( "RageFileDriverZip" ) { m_bFileOwned = false; @@ -44,7 +44,7 @@ bool RageFileDriverZip::Load( const RString &sPath ) m_sPath = sPath; m_Mutex.SetName( ssprintf("RageFileDriverZip(%s)", sPath.c_str()) ); - RageFile *pFile = smnew RageFile; + RageFile *pFile = new RageFile; if( !pFile->Open(sPath) ) { @@ -154,7 +154,7 @@ bool RageFileDriverZip::ParseZipfile() if( got == 0 ) /* skip */ continue; - FileInfo *pInfo = smnew FileInfo( info ); + FileInfo *pInfo = new FileInfo( info ); m_pFiles.push_back( pInfo ); FDB->AddFile( "/" + pInfo->m_sName, pInfo->m_iUncompressedSize, pInfo->m_iCRC32, pInfo ); } @@ -322,7 +322,7 @@ RageFileBasic *RageFileDriverZip::Open( const RString &sPath, int iMode, int &iE * threadsafe), so we can unlock now. */ m_Mutex.Unlock(); - RageFileDriverSlice *pSlice = smnew RageFileDriverSlice( m_pZip->Copy(), info->m_iDataOffset, info->m_iCompressedSize ); + RageFileDriverSlice *pSlice = new RageFileDriverSlice( m_pZip->Copy(), info->m_iDataOffset, info->m_iCompressedSize ); pSlice->DeleteFileWhenFinished(); switch( info->m_iCompressionMethod ) @@ -331,7 +331,7 @@ RageFileBasic *RageFileDriverZip::Open( const RString &sPath, int iMode, int &iE return pSlice; case DEFLATED: { - RageFileObjInflate *pInflate = smnew RageFileObjInflate( pSlice, info->m_iUncompressedSize ); + RageFileObjInflate *pInflate = new RageFileObjInflate( pSlice, info->m_iUncompressedSize ); pInflate->DeleteFileWhenFinished(); return pInflate; } diff --git a/src/RageFileManager.cpp b/src/RageFileManager.cpp index 9ad23a8a7e..7e783ad1d4 100644 --- a/src/RageFileManager.cpp +++ b/src/RageFileManager.cpp @@ -150,7 +150,7 @@ static bool GrabDriver( RageFileDriver *pDriver ) class RageFileDriverMountpoints: public RageFileDriver { public: - RageFileDriverMountpoints(): RageFileDriver( smnew FilenameDB ) { } + RageFileDriverMountpoints(): RageFileDriver( new FilenameDB ) { } RageFileBasic *Open( const RString &sPath, int iMode, int &iError ) { iError = (iMode == RageFile::WRITE)? ERROR_WRITING_NOT_SUPPORTED:ENOENT; @@ -264,10 +264,10 @@ RageFileManager::RageFileManager( const RString &argv0 ) CHECKPOINT_M( argv0 ); ChangeToDirOfExecutable( argv0 ); - g_Mutex = smnew RageEvent("RageFileManager"); + g_Mutex = new RageEvent("RageFileManager"); - g_Mountpoints = smnew RageFileDriverMountpoints; - LoadedDriver *pLoadedDriver = smnew LoadedDriver; + g_Mountpoints = new RageFileDriverMountpoints; + LoadedDriver *pLoadedDriver = new LoadedDriver; pLoadedDriver->m_pDriver = g_Mountpoints; pLoadedDriver->m_sMountPoint = "/"; pLoadedDriver->m_sType = "mountpoints"; @@ -515,7 +515,7 @@ bool RageFileManager::Mount( const RString &sType, const RString &sRoot_, const CHECKPOINT; - LoadedDriver *pLoadedDriver = smnew LoadedDriver; + LoadedDriver *pLoadedDriver = new LoadedDriver; pLoadedDriver->m_pDriver = pDriver; pLoadedDriver->m_sType = sType; pLoadedDriver->m_sRoot = sRoot; @@ -532,7 +532,7 @@ void RageFileManager::Mount( RageFileDriver *pDriver, const RString &sMountPoint AdjustMountpoint( sMountPoint ); - LoadedDriver *pLoadedDriver = smnew LoadedDriver; + LoadedDriver *pLoadedDriver = new LoadedDriver; pLoadedDriver->m_pDriver = pDriver; pLoadedDriver->m_sType = ""; pLoadedDriver->m_sRoot = ""; diff --git a/src/RageFileManager_ReadAhead.cpp b/src/RageFileManager_ReadAhead.cpp index f06ae252f6..f955856282 100644 --- a/src/RageFileManager_ReadAhead.cpp +++ b/src/RageFileManager_ReadAhead.cpp @@ -129,7 +129,7 @@ void RageFileManagerReadAhead::ReadAhead( RageFileBasic *pFile, int iBytes ) int iStart = lseek( iFD, 0, SEEK_CUR ); - RageFileReadAheadThread *pReadAhead = smnew RageFileReadAheadThread( iFD, iStart, iBytes ); + RageFileReadAheadThread *pReadAhead = new RageFileReadAheadThread( iFD, iStart, iBytes ); g_apReadAheads.push_back( pReadAhead ); for( size_t i = 0; i < g_apReadAheads.size(); ++i ) diff --git a/src/RageLog.cpp b/src/RageLog.cpp index 8a12065940..d3dda497de 100644 --- a/src/RageLog.cpp +++ b/src/RageLog.cpp @@ -81,11 +81,11 @@ enum RageLog::RageLog(): m_bLogToDisk(false), m_bInfoToDisk(false), m_bUserLogToDisk(false), m_bFlush(false), m_bShowLogOutput(false) { - g_fileLog = smnew RageFile; - g_fileInfo = smnew RageFile; - g_fileUserLog = smnew RageFile; + g_fileLog = new RageFile; + g_fileInfo = new RageFile; + g_fileUserLog = new RageFile; - g_Mutex = smnew RageMutex( "Log" ); + g_Mutex = new RageMutex( "Log" ); } RageLog::~RageLog() diff --git a/src/RageSound.cpp b/src/RageSound.cpp index c93f8c8a1f..462be50b15 100644 --- a/src/RageSound.cpp +++ b/src/RageSound.cpp @@ -140,7 +140,7 @@ public: int GetLength_Fast() const { return 0; } int SetPosition( int iFrame ) { return 1; } int Read( float *pBuf, int iFrames ) { return RageSoundReader::END_OF_FILE; } - RageSoundReader *Copy() const { return smnew RageSoundReader_Silence; } + RageSoundReader *Copy() const { return new RageSoundReader_Silence; } int GetSampleRate() const { return 44100; } unsigned GetNumChannels() const { return 1; } int GetNextSourceFrame() const { return 0; } @@ -180,7 +180,7 @@ bool RageSound::Load( RString sSoundFilePath, bool bPrecache, const RageSoundLoa LOG->Warn( "RageSound::Load: error opening sound \"%s\": %s", sSoundFilePath.c_str(), error.c_str() ); - pSound = smnew RageSoundReader_Silence; + pSound = new RageSoundReader_Silence; } /* If the sound is prebuffered into memory, we don't need to buffer reads. */ @@ -208,19 +208,19 @@ bool RageSound::Load( RString sSoundFilePath, bool bPrecache, const RageSoundLoa bNeedBuffer = false; } - m_pSource = smnew RageSoundReader_Extend( m_pSource ); + m_pSource = new RageSoundReader_Extend( m_pSource ); if( bNeedBuffer ) - m_pSource = smnew RageSoundReader_ThreadedBuffer( m_pSource ); - m_pSource = smnew RageSoundReader_PostBuffering( m_pSource ); + m_pSource = new RageSoundReader_ThreadedBuffer( m_pSource ); + m_pSource = new RageSoundReader_PostBuffering( m_pSource ); if( pParams->m_bSupportRateChanging ) { - RageSoundReader_PitchChange *pRate = smnew RageSoundReader_PitchChange( m_pSource ); + RageSoundReader_PitchChange *pRate = new RageSoundReader_PitchChange( m_pSource ); m_pSource = pRate; } if( pParams->m_bSupportPan ) - m_pSource = smnew RageSoundReader_Pan( m_pSource ); + m_pSource = new RageSoundReader_Pan( m_pSource ); m_sFilePath = sSoundFilePath; @@ -239,7 +239,7 @@ void RageSound::LoadSoundReader( RageSoundReader *pSound ) bool bSupportRateChange = false; if( iNeededRate != pSound->GetSampleRate() || bSupportRateChange ) { - RageSoundReader_Resample_Good *Resample = smnew RageSoundReader_Resample_Good( pSound, iNeededRate ); + RageSoundReader_Resample_Good *Resample = new RageSoundReader_Resample_Good( pSound, iNeededRate ); pSound = Resample; } @@ -414,7 +414,7 @@ void RageSound::Play( const RageSoundParams *pParams ) void RageSound::PlayCopy( const RageSoundParams *pParams ) const { - RageSound *pSound = smnew RageSound( *this ); + RageSound *pSound = new RageSound( *this ); if( pParams ) pSound->SetParams( *pParams ); diff --git a/src/RageSoundPosMap.cpp b/src/RageSoundPosMap.cpp index 9f09ad5447..d073666fe8 100644 --- a/src/RageSoundPosMap.cpp +++ b/src/RageSoundPosMap.cpp @@ -29,7 +29,7 @@ struct pos_map_impl pos_map_queue::pos_map_queue() { - m_pImpl = smnew pos_map_impl; + m_pImpl = new pos_map_impl; } pos_map_queue::~pos_map_queue() @@ -40,13 +40,13 @@ pos_map_queue::~pos_map_queue() pos_map_queue::pos_map_queue( const pos_map_queue &cpy ) { *this = cpy; - m_pImpl = smnew pos_map_impl( *cpy.m_pImpl ); + m_pImpl = new pos_map_impl( *cpy.m_pImpl ); } pos_map_queue &pos_map_queue::operator=( const pos_map_queue &rhs ) { delete m_pImpl; - m_pImpl = smnew pos_map_impl( *rhs.m_pImpl ); + m_pImpl = new pos_map_impl( *rhs.m_pImpl ); return *this; } diff --git a/src/RageSoundReader_Chain.cpp b/src/RageSoundReader_Chain.cpp index 3b1be60765..c95c90d714 100644 --- a/src/RageSoundReader_Chain.cpp +++ b/src/RageSoundReader_Chain.cpp @@ -162,7 +162,7 @@ void RageSoundReader_Chain::Finish() { RageSoundReader *&pSound = (*it); - RageSoundReader_Resample_Good *pResample = smnew RageSoundReader_Resample_Good( pSound, m_iPreferredSampleRate ); + RageSoundReader_Resample_Good *pResample = new RageSoundReader_Resample_Good( pSound, m_iPreferredSampleRate ); pSound = pResample; } @@ -229,7 +229,7 @@ void RageSoundReader_Chain::ActivateSound( Sound *s ) * as this sound, and does not need to be panned, we can omit this. */ if( s->fPan != 0.0f || s->pSound->GetNumChannels() != this->GetNumChannels() ) { - s->pSound = smnew RageSoundReader_Pan( s->pSound ); + s->pSound = new RageSoundReader_Pan( s->pSound ); s->pSound->SetProperty( "Pan", s->fPan ); } diff --git a/src/RageSoundReader_ChannelSplit.cpp b/src/RageSoundReader_ChannelSplit.cpp index 991f4d51a9..7bc0e821ae 100644 --- a/src/RageSoundReader_ChannelSplit.cpp +++ b/src/RageSoundReader_ChannelSplit.cpp @@ -233,7 +233,7 @@ void RageSoundReader_Split::AddSourceChannelToSound( int iFromChannel, int iToCh RageSoundSplitter::RageSoundSplitter( RageSoundReader *pSource ) { - m_pImpl = smnew RageSoundSplitterImpl( pSource ); + m_pImpl = new RageSoundSplitterImpl( pSource ); } RageSoundSplitter::~RageSoundSplitter() @@ -243,7 +243,7 @@ RageSoundSplitter::~RageSoundSplitter() RageSoundReader_Split *RageSoundSplitter::CreateSound() { - return smnew RageSoundReader_Split( m_pImpl ); + return new RageSoundReader_Split( m_pImpl ); } /* diff --git a/src/RageSoundReader_ChannelSplit.h b/src/RageSoundReader_ChannelSplit.h index ba415e23d4..e6cb9859ad 100644 --- a/src/RageSoundReader_ChannelSplit.h +++ b/src/RageSoundReader_ChannelSplit.h @@ -12,7 +12,7 @@ class RageSoundReader_Split: public RageSoundReader public: RageSoundReader_Split( const RageSoundReader_Split &cpy ); ~RageSoundReader_Split(); - virtual RageSoundReader_Split *Copy() const { return smnew RageSoundReader_Split(*this); } + virtual RageSoundReader_Split *Copy() const { return new RageSoundReader_Split(*this); } virtual int GetLength() const; virtual int GetLength_Fast() const; diff --git a/src/RageSoundReader_Extend.h b/src/RageSoundReader_Extend.h index 4dbf1750fa..73d6972cb5 100644 --- a/src/RageSoundReader_Extend.h +++ b/src/RageSoundReader_Extend.h @@ -14,7 +14,7 @@ public: virtual int GetNextSourceFrame() const; virtual bool SetProperty( const RString &sProperty, float fValue ); - RageSoundReader_Extend *Copy() const { return smnew RageSoundReader_Extend(*this); } + RageSoundReader_Extend *Copy() const { return new RageSoundReader_Extend(*this); } ~RageSoundReader_Extend() { } private: diff --git a/src/RageSoundReader_FileReader.cpp b/src/RageSoundReader_FileReader.cpp index c231fd5a2f..5c43fc080b 100644 --- a/src/RageSoundReader_FileReader.cpp +++ b/src/RageSoundReader_FileReader.cpp @@ -22,16 +22,16 @@ RageSoundReader_FileReader *RageSoundReader_FileReader::TryOpenFile( RageFileBas #ifndef NO_WAV_SUPPORT if( !format.CompareNoCase("wav") ) - Sample = smnew RageSoundReader_WAV; + Sample = new RageSoundReader_WAV; #endif #ifndef NO_MP3_SUPPORT if( !format.CompareNoCase("mp3") ) - Sample = smnew RageSoundReader_MP3; + Sample = new RageSoundReader_MP3; #endif #ifndef NO_VORBIS_SUPPORT if( !format.CompareNoCase("oga") || !format.CompareNoCase("ogg") ) - Sample = smnew RageSoundReader_Vorbisfile; + Sample = new RageSoundReader_Vorbisfile; #endif if( !Sample ) @@ -90,7 +90,7 @@ RageSoundReader_FileReader *RageSoundReader_FileReader::OpenFile( RString filena { HiddenPtr pFile; { - RageFile *pFileOpen = smnew RageFile; + RageFile *pFileOpen = new RageFile; if( !pFileOpen->Open(filename) ) { error = pFileOpen->GetError(); @@ -104,7 +104,7 @@ RageSoundReader_FileReader *RageSoundReader_FileReader::OpenFile( RString filena { if( pFile->GetFileSize() < 1024*50 ) { - RageFileObjMem *pMem = smnew RageFileObjMem; + RageFileObjMem *pMem = new RageFileObjMem; bool bRet = FileCopy( *pFile, *pMem, error, NULL ); if( !bRet ) { diff --git a/src/RageSoundReader_MP3.cpp b/src/RageSoundReader_MP3.cpp index f54f7cfdc0..a85ecbc4e7 100644 --- a/src/RageSoundReader_MP3.cpp +++ b/src/RageSoundReader_MP3.cpp @@ -606,7 +606,7 @@ int RageSoundReader_MP3::resync() RageSoundReader_MP3::RageSoundReader_MP3() { - mad = smnew madlib_t; + mad = new madlib_t; m_bAccurateSync = false; mad_stream_init( &mad->Stream ); @@ -680,7 +680,7 @@ RageSoundReader_FileReader::OpenResult RageSoundReader_MP3::Open( RageFileBasic RageSoundReader_MP3 *RageSoundReader_MP3::Copy() const { - RageSoundReader_MP3 *ret = smnew RageSoundReader_MP3; + RageSoundReader_MP3 *ret = new RageSoundReader_MP3; ret->m_pFile = m_pFile->Copy(); ret->m_pFile->Seek( 0 ); diff --git a/src/RageSoundReader_Merge.cpp b/src/RageSoundReader_Merge.cpp index 26f49b0556..f00e1e4600 100644 --- a/src/RageSoundReader_Merge.cpp +++ b/src/RageSoundReader_Merge.cpp @@ -74,7 +74,7 @@ void RageSoundReader_Merge::Finish( int iPreferredSampleRate ) { RageSoundReader *&pSound = (*it); - RageSoundReader_Resample_Good *pResample = smnew RageSoundReader_Resample_Good( pSound, iPreferredSampleRate ); + RageSoundReader_Resample_Good *pResample = new RageSoundReader_Resample_Good( pSound, iPreferredSampleRate ); pSound = pResample; } @@ -85,7 +85,7 @@ void RageSoundReader_Merge::Finish( int iPreferredSampleRate ) FOREACH( RageSoundReader *, m_aSounds, it ) { if( (*it)->GetNumChannels() != this->GetNumChannels() ) - (*it) = smnew RageSoundReader_Pan( (*it) ); + (*it) = new RageSoundReader_Pan( (*it) ); } /* If we have more than two channels, then all sounds must have the same number of diff --git a/src/RageSoundReader_Merge.h b/src/RageSoundReader_Merge.h index bd75fc5d6f..571a7bce3e 100644 --- a/src/RageSoundReader_Merge.h +++ b/src/RageSoundReader_Merge.h @@ -9,7 +9,7 @@ public: RageSoundReader_Merge(); virtual ~RageSoundReader_Merge(); RageSoundReader_Merge( const RageSoundReader_Merge &cpy ); - virtual RageSoundReader_Merge *Copy() const { return smnew RageSoundReader_Merge( *this ); } + virtual RageSoundReader_Merge *Copy() const { return new RageSoundReader_Merge( *this ); } virtual int GetLength() const; virtual int GetLength_Fast() const; diff --git a/src/RageSoundReader_Pan.h b/src/RageSoundReader_Pan.h index 79c85844ea..930d38cf59 100644 --- a/src/RageSoundReader_Pan.h +++ b/src/RageSoundReader_Pan.h @@ -9,7 +9,7 @@ class RageSoundReader_Pan: public RageSoundReader_Filter { public: RageSoundReader_Pan( RageSoundReader *pSource ); - RageSoundReader_Pan *Copy() const { return smnew RageSoundReader_Pan(*this); } + RageSoundReader_Pan *Copy() const { return new RageSoundReader_Pan(*this); } virtual unsigned GetNumChannels() const; virtual int Read( float *pBuf, int iFrames ); virtual bool SetProperty( const RString &sProperty, float fValue ); diff --git a/src/RageSoundReader_PitchChange.cpp b/src/RageSoundReader_PitchChange.cpp index 0fd1ad6816..9d54e0e214 100644 --- a/src/RageSoundReader_PitchChange.cpp +++ b/src/RageSoundReader_PitchChange.cpp @@ -17,8 +17,8 @@ RageSoundReader_PitchChange::RageSoundReader_PitchChange( RageSoundReader *pSource ): RageSoundReader_Filter( NULL ) { - m_pSpeedChange = smnew RageSoundReader_SpeedChange( pSource ); - m_pResample = smnew RageSoundReader_Resample_Good( m_pSpeedChange, m_pSpeedChange->GetSampleRate() ); + m_pSpeedChange = new RageSoundReader_SpeedChange( pSource ); + m_pResample = new RageSoundReader_Resample_Good( m_pSpeedChange, m_pSpeedChange->GetSampleRate() ); m_pSource = m_pResample; m_fSpeedRatio = 1.0f; m_fPitchRatio = 1.0f; diff --git a/src/RageSoundReader_PitchChange.h b/src/RageSoundReader_PitchChange.h index f1e5e38297..e7c20f8158 100644 --- a/src/RageSoundReader_PitchChange.h +++ b/src/RageSoundReader_PitchChange.h @@ -19,7 +19,7 @@ public: void SetSpeedRatio( float fRatio ) { m_fSpeedRatio = fRatio; } void SetPitchRatio( float fRatio ) { m_fPitchRatio = fRatio; } - virtual RageSoundReader_PitchChange *Copy() const { return smnew RageSoundReader_PitchChange(*this); } + virtual RageSoundReader_PitchChange *Copy() const { return new RageSoundReader_PitchChange(*this); } private: RageSoundReader_SpeedChange *m_pSpeedChange; // freed by RageSoundReader_Filter diff --git a/src/RageSoundReader_PostBuffering.h b/src/RageSoundReader_PostBuffering.h index bf038150e4..28668256c4 100644 --- a/src/RageSoundReader_PostBuffering.h +++ b/src/RageSoundReader_PostBuffering.h @@ -9,7 +9,7 @@ class RageSoundReader_PostBuffering: public RageSoundReader_Filter { public: RageSoundReader_PostBuffering( RageSoundReader *pSource ); - RageSoundReader_PostBuffering *Copy() const { return smnew RageSoundReader_PostBuffering(*this); } + RageSoundReader_PostBuffering *Copy() const { return new RageSoundReader_PostBuffering(*this); } virtual int Read( float *pBuf, int iFrames ); virtual bool SetProperty( const RString &sProperty, float fValue ); diff --git a/src/RageSoundReader_Preload.cpp b/src/RageSoundReader_Preload.cpp index 1f9b367fc3..ff7e659bf1 100644 --- a/src/RageSoundReader_Preload.cpp +++ b/src/RageSoundReader_Preload.cpp @@ -20,7 +20,7 @@ Preference g_iSoundPreloadMaxSamples( "SoundPreloadMaxSamples", 1024*1024 ) bool RageSoundReader_Preload::PreloadSound( RageSoundReader *&pSound ) { - RageSoundReader_Preload *pPreload = smnew RageSoundReader_Preload; + RageSoundReader_Preload *pPreload = new RageSoundReader_Preload; if( !pPreload->Open(pSound) ) { /* Preload failed. It read some data, so we need to rewind the reader. */ @@ -34,7 +34,7 @@ bool RageSoundReader_Preload::PreloadSound( RageSoundReader *&pSound ) } RageSoundReader_Preload::RageSoundReader_Preload(): - m_Buffer( smnew RString ), m_bBufferIs16Bit(false), + m_Buffer( new RString ), m_bBufferIs16Bit(false), m_iPosition(0), m_iSampleRate(0), m_iChannels(0), m_fRate(0.0f) { m_bBufferIs16Bit = g_bSoundPreload16bit.Get(); @@ -157,7 +157,7 @@ int RageSoundReader_Preload::Read( float *pBuffer, int iFrames ) RageSoundReader_Preload *RageSoundReader_Preload::Copy() const { - return smnew RageSoundReader_Preload(*this); + return new RageSoundReader_Preload(*this); } int RageSoundReader_Preload::GetReferenceCount() const diff --git a/src/RageSoundReader_Resample_Good.cpp b/src/RageSoundReader_Resample_Good.cpp index 1ee2d8bca2..eb705efa1d 100644 --- a/src/RageSoundReader_Resample_Good.cpp +++ b/src/RageSoundReader_Resample_Good.cpp @@ -151,13 +151,13 @@ public: AlignedBuffer( int iSize ) { m_iSize = iSize; - m_pBuf = smnew T[m_iSize]; + m_pBuf = new T[m_iSize]; } AlignedBuffer( const AlignedBuffer &cpy ) { m_iSize = cpy.m_iSize; - m_pBuf = smnew T[m_iSize]; + m_pBuf = new T[m_iSize]; memcpy( m_pBuf, cpy.m_pBuf, sizeof(T)*m_iSize ); } ~AlignedBuffer() @@ -422,13 +422,13 @@ namespace PolyphaseFilterCache return result; } int iWinSize = L*iUpFactor; - float *pFIR = smnew float[iWinSize]; + float *pFIR = new float[iWinSize]; GenerateSincLowPassFilter( pFIR, iWinSize, fCutoffFrequency ); ApplyKaiserWindow( pFIR, iWinSize, 8 ); NormalizeVector( pFIR, iWinSize ); MultiplyVector( &pFIR[0], &pFIR[iWinSize], (float) iUpFactor ); - PolyphaseFilter *pPolyphase = smnew PolyphaseFilter( iUpFactor ); + PolyphaseFilter *pPolyphase = new PolyphaseFilter( iUpFactor ); pPolyphase->Generate( pFIR ); delete [] pFIR; @@ -484,7 +484,7 @@ public: SetDownFactor( iUpFactor ); - m_pState = smnew PolyphaseFilter::State( iUpFactor ); + m_pState = new PolyphaseFilter::State( iUpFactor ); } ~RageSoundResampler_Polyphase() @@ -506,7 +506,7 @@ public: void Reset() { delete m_pState; - m_pState = smnew PolyphaseFilter::State( m_iUpFactor ); + m_pState = new PolyphaseFilter::State( m_iUpFactor ); } int NumInputsForOutputSamples( int iOut ) const { return m_pPolyphase->NumInputsForOutputSamples(*m_pState, iOut, m_iDownFactor); } @@ -516,7 +516,7 @@ public: RageSoundResampler_Polyphase( const RageSoundResampler_Polyphase &cpy ) { m_pPolyphase = cpy.m_pPolyphase; // don't copy - m_pState = smnew PolyphaseFilter::State(*cpy.m_pState); + m_pState = new PolyphaseFilter::State(*cpy.m_pState); m_iUpFactor = cpy.m_iUpFactor; m_iDownFactor = cpy.m_iDownFactor; } @@ -631,7 +631,7 @@ void RageSoundReader_Resample_Good::ReopenResampler() if( m_fRate != -1 ) iMaxDownFactor *= 5; - RageSoundResampler_Polyphase *p = smnew RageSoundResampler_Polyphase( iUpFactor, iMinDownFactor, iMaxDownFactor ); + RageSoundResampler_Polyphase *p = new RageSoundResampler_Polyphase( iUpFactor, iMinDownFactor, iMaxDownFactor ); m_apResamplers.push_back( p ); } @@ -734,14 +734,14 @@ RageSoundReader_Resample_Good::RageSoundReader_Resample_Good( const RageSoundRea RageSoundReader_Filter(cpy) { for( size_t i = 0; i < cpy.m_apResamplers.size(); ++i ) - this->m_apResamplers.push_back( smnew RageSoundResampler_Polyphase(*cpy.m_apResamplers[i]) ); + this->m_apResamplers.push_back( new RageSoundResampler_Polyphase(*cpy.m_apResamplers[i]) ); this->m_iSampleRate = cpy.m_iSampleRate; this->m_fRate = cpy.m_fRate; } RageSoundReader_Resample_Good *RageSoundReader_Resample_Good::Copy() const { - return smnew RageSoundReader_Resample_Good( *this ); + return new RageSoundReader_Resample_Good( *this ); } /* diff --git a/src/RageSoundReader_SpeedChange.h b/src/RageSoundReader_SpeedChange.h index 794ead476e..82b2817ca9 100644 --- a/src/RageSoundReader_SpeedChange.h +++ b/src/RageSoundReader_SpeedChange.h @@ -12,7 +12,7 @@ public: virtual int SetPosition( int iFrame ); virtual int Read( float *pBuf, int iFrames ); - virtual RageSoundReader_SpeedChange *Copy() const { return smnew RageSoundReader_SpeedChange(*this); } + virtual RageSoundReader_SpeedChange *Copy() const { return new RageSoundReader_SpeedChange(*this); } virtual bool SetProperty( const RString &sProperty, float fValue ); virtual int GetNextSourceFrame() const; virtual float GetStreamToSourceRatio() const; diff --git a/src/RageSoundReader_ThreadedBuffer.h b/src/RageSoundReader_ThreadedBuffer.h index fca2a4e4c6..f440c35ac7 100644 --- a/src/RageSoundReader_ThreadedBuffer.h +++ b/src/RageSoundReader_ThreadedBuffer.h @@ -15,7 +15,7 @@ public: RageSoundReader_ThreadedBuffer( RageSoundReader *pSource ); RageSoundReader_ThreadedBuffer( const RageSoundReader_ThreadedBuffer &cpy ); ~RageSoundReader_ThreadedBuffer(); - RageSoundReader_ThreadedBuffer *Copy() const { return smnew RageSoundReader_ThreadedBuffer(*this); } + RageSoundReader_ThreadedBuffer *Copy() const { return new RageSoundReader_ThreadedBuffer(*this); } virtual int SetPosition( int iFrame ); virtual int Read( float *pBuffer, int iLength ); diff --git a/src/RageSoundReader_Vorbisfile.cpp b/src/RageSoundReader_Vorbisfile.cpp index cf810065bd..6b60ab34bc 100644 --- a/src/RageSoundReader_Vorbisfile.cpp +++ b/src/RageSoundReader_Vorbisfile.cpp @@ -73,7 +73,7 @@ static RString ov_ssprintf( int err, const char *fmt, ...) RageSoundReader_FileReader::OpenResult RageSoundReader_Vorbisfile::Open( RageFileBasic *pFile ) { m_pFile = pFile; - vf = smnew OggVorbis_File; + vf = new OggVorbis_File; memset( vf, 0, sizeof(*vf) ); ov_callbacks callbacks; @@ -293,7 +293,7 @@ RageSoundReader_Vorbisfile *RageSoundReader_Vorbisfile::Copy() const { RageFileBasic *pFile = m_pFile->Copy(); pFile->Seek(0); - RageSoundReader_Vorbisfile *ret = smnew RageSoundReader_Vorbisfile; + RageSoundReader_Vorbisfile *ret = new RageSoundReader_Vorbisfile; /* If we were able to open the sound in the first place, we expect to * be able to reopen it. */ diff --git a/src/RageSoundReader_WAV.cpp b/src/RageSoundReader_WAV.cpp index a26d61f799..d1b689f7f9 100644 --- a/src/RageSoundReader_WAV.cpp +++ b/src/RageSoundReader_WAV.cpp @@ -231,7 +231,7 @@ public: if( m_sError.size() != 0 ) return false; - m_pBuffer = smnew float[m_iFramesPerBlock*m_WavData.m_iChannels]; + m_pBuffer = new float[m_iFramesPerBlock*m_WavData.m_iChannels]; m_iBufferAvail = m_iBufferUsed = 0; m_File.Seek( m_WavData.m_iDataChunkPos ); @@ -558,10 +558,10 @@ RageSoundReader_FileReader::OpenResult RageSoundReader_WAV::Open( RageFileBasic { case 1: // PCM case 3: // FLOAT - m_pImpl = smnew WavReaderPCM( *m_pFile, m_WavData ); + m_pImpl = new WavReaderPCM( *m_pFile, m_WavData ); break; case 2: // ADPCM - m_pImpl = smnew WavReaderADPCM( *m_pFile, m_WavData ); + m_pImpl = new WavReaderADPCM( *m_pFile, m_WavData ); break; case 85: // MP3 /* Return unknown, so other decoders will be tried. MAD can read MP3s embedded in WAVs. */ @@ -615,7 +615,7 @@ RageSoundReader_WAV::~RageSoundReader_WAV() RageSoundReader_WAV *RageSoundReader_WAV::Copy() const { - RageSoundReader_WAV *ret = smnew RageSoundReader_WAV; + RageSoundReader_WAV *ret = new RageSoundReader_WAV; RageFileBasic *pFile = m_pFile->Copy(); pFile->Seek( 0 ); ret->Open( pFile ); diff --git a/src/RageSurface.cpp b/src/RageSurface.cpp index 26176b2a5f..fd586849b9 100644 --- a/src/RageSurface.cpp +++ b/src/RageSurface.cpp @@ -52,7 +52,7 @@ RageSurfaceFormat::RageSurfaceFormat( const RageSurfaceFormat &cpy ): { memcpy( this, &cpy, sizeof(RageSurfaceFormat) ); if( palette ) - palette = smnew RageSurfacePalette( *palette ); + palette = new RageSurfacePalette( *palette ); } RageSurfaceFormat::~RageSurfaceFormat() @@ -136,7 +136,7 @@ RageSurface::RageSurface( const RageSurface &cpy ) pixels_owned = true; if( cpy.pixels ) { - pixels = smnew uint8_t[ pitch*h ]; + pixels = new uint8_t[ pitch*h ]; memcpy( pixels, cpy.pixels, pitch*h ); } else @@ -193,7 +193,7 @@ void SetupFormat( RageSurfaceFormat &fmt, // Loss for paletted textures is zero; the actual palette entries are 8-bit. ZERO( fmt.Loss ); - fmt.palette = smnew RageSurfacePalette; + fmt.palette = new RageSurfacePalette; fmt.palette->ncolors = 256; } else @@ -217,7 +217,7 @@ void SetupFormat( RageSurfaceFormat &fmt, RageSurface *CreateSurface( int width, int height, int BitsPerPixel, uint32_t Rmask, uint32_t Gmask, uint32_t Bmask, uint32_t Amask ) { - RageSurface *pImg = smnew RageSurface; + RageSurface *pImg = new RageSurface; SetupFormat( pImg->fmt, width, height, BitsPerPixel, Rmask, Gmask, Bmask, Amask ); @@ -225,12 +225,12 @@ RageSurface *CreateSurface( int width, int height, int BitsPerPixel, uint32_t Rm pImg->h = height; pImg->flags = 0; pImg->pitch = width*BitsPerPixel/8; - pImg->pixels = smnew uint8_t[ pImg->pitch*height ]; + pImg->pixels = new uint8_t[ pImg->pitch*height ]; /* if( BitsPerPixel == 8 ) { - pImg->fmt.palette = smnew RageSurfacePalette; + pImg->fmt.palette = new RageSurfacePalette; } */ @@ -239,7 +239,7 @@ RageSurface *CreateSurface( int width, int height, int BitsPerPixel, uint32_t Rm RageSurface *CreateSurfaceFrom( int width, int height, int BitsPerPixel, uint32_t Rmask, uint32_t Gmask, uint32_t Bmask, uint32_t Amask, uint8_t *pPixels, uint32_t pitch ) { - RageSurface *pImg = smnew RageSurface; + RageSurface *pImg = new RageSurface; SetupFormat( pImg->fmt, width, height, BitsPerPixel, Rmask, Gmask, Bmask, Amask ); diff --git a/src/RageSurfaceUtils.cpp b/src/RageSurfaceUtils.cpp index be6232f37f..539491bdf1 100644 --- a/src/RageSurfaceUtils.cpp +++ b/src/RageSurfaceUtils.cpp @@ -1033,7 +1033,7 @@ void RageSurfaceUtils::FlipVertically( RageSurface *img ) { const int pitch = img->pitch; const int bytes_per_row = img->format->BytesPerPixel * img->w; - char *row = smnew char[bytes_per_row]; + char *row = new char[bytes_per_row]; for( int y=0; y < img->h/2; y++ ) { diff --git a/src/RageSurfaceUtils_Palettize.cpp b/src/RageSurfaceUtils_Palettize.cpp index 87b9f2e3bd..7957c0db43 100644 --- a/src/RageSurfaceUtils_Palettize.cpp +++ b/src/RageSurfaceUtils_Palettize.cpp @@ -175,8 +175,8 @@ void RageSurfaceUtils::Palettize( RageSurface *&pImg, int iColors, bool bDither if( bDither ) { // Initialize Floyd-Steinberg error vectors. - thiserr = smnew pixerror_t[pImg->w + 2]; - nexterr = smnew pixerror_t[pImg->w + 2]; + thiserr = new pixerror_t[pImg->w + 2]; + nexterr = new pixerror_t[pImg->w + 2]; memset( thiserr, 0, sizeof(pixerror_t) * (pImg->w + 2) ); } diff --git a/src/RageTextureManager.cpp b/src/RageTextureManager.cpp index 2b98c50dcd..8062cabe2e 100644 --- a/src/RageTextureManager.cpp +++ b/src/RageTextureManager.cpp @@ -141,11 +141,11 @@ RageTexture* RageTextureManager::LoadTextureInternal( RageTextureID ID ) RageTexture* pTexture; if( ID.filename == g_sDefaultTextureName ) - pTexture = smnew RageTexture_Default; + pTexture = new RageTexture_Default; else if( sExt == "ogv" || sExt == "avi" || sExt == "mpg" || sExt == "mpeg" ) pTexture = RageMovieTexture::Create( ID ); else - pTexture = smnew RageBitmapTexture( ID ); + pTexture = new RageBitmapTexture( ID ); m_mapPathToTexture[ID] = pTexture; diff --git a/src/RageThreads.cpp b/src/RageThreads.cpp index d1d0121341..6efb6ebf45 100644 --- a/src/RageThreads.cpp +++ b/src/RageThreads.cpp @@ -531,7 +531,7 @@ RageMutex::RageMutex( const RString &name ): /* if( g_FreeMutexIDs == NULL ) { - g_FreeMutexIDs = smnew set; + g_FreeMutexIDs = new set; for( int i = 0; i < MAX_MUTEXES; ++i ) g_FreeMutexIDs->insert( i ); } @@ -555,7 +555,7 @@ RageMutex::RageMutex( const RString &name ): g_FreeMutexIDs->erase( g_FreeMutexIDs->begin() ); if( g_MutexList == NULL ) - g_MutexList = smnew vector; + g_MutexList = new vector; g_MutexList->push_back( this ); */ diff --git a/src/RageUtil.h b/src/RageUtil.h index ae0c8ce48c..e3a83e576f 100644 --- a/src/RageUtil.h +++ b/src/RageUtil.h @@ -115,7 +115,7 @@ void CircularShift( vector &v, int dist ) } template -static Ret *CreateClass() { return smnew Type; } +static Ret *CreateClass() { return new Type; } /* * Helper function to remove all objects from an STL container for which the diff --git a/src/RageUtil_AutoPtr.h b/src/RageUtil_AutoPtr.h index 6baf854e9a..1c009dcbb3 100644 --- a/src/RageUtil_AutoPtr.h +++ b/src/RageUtil_AutoPtr.h @@ -12,7 +12,7 @@ * Note that there are no non-const operator* or operator-> overloads, because that would * cause all const access by code with non-const permissions to deep-copy. For example, * - * AutoPtrCopyOnWrite a( smnew int(1) ); + * AutoPtrCopyOnWrite a( new int(1) ); * AutoPtrCopyOnWrite b( a ); * printf( "%i\n", *a ); * @@ -27,11 +27,11 @@ class AutoPtrCopyOnWrite { public: /* This constructor only exists to make us work with STL containers. */ - inline AutoPtrCopyOnWrite(): m_pPtr(NULL), m_iRefCount(smnew int(1)) + inline AutoPtrCopyOnWrite(): m_pPtr(NULL), m_iRefCount(new int(1)) { } - explicit inline AutoPtrCopyOnWrite( T *p ): m_pPtr(p), m_iRefCount(smnew int(1)) + explicit inline AutoPtrCopyOnWrite( T *p ): m_pPtr(p), m_iRefCount(new int(1)) { } @@ -70,8 +70,8 @@ public: if( *m_iRefCount > 1 ) { --*m_iRefCount; - m_pPtr = smnew T(*m_pPtr); - m_iRefCount = smnew int(1); + m_pPtr = new T(*m_pPtr); + m_iRefCount = new int(1); } return m_pPtr; diff --git a/src/RageUtil_CharConversions.cpp b/src/RageUtil_CharConversions.cpp index 287ae27dc8..f41957b430 100644 --- a/src/RageUtil_CharConversions.cpp +++ b/src/RageUtil_CharConversions.cpp @@ -100,7 +100,7 @@ static bool ConvertFromCP( RString &sText, int iCodePage ) return false; const size_t size = CFStringGetMaximumSizeForEncoding( CFStringGetLength(old), kCFStringEncodingUTF8 ); - char *buf = smnew char[size+1]; + char *buf = new char[size+1]; buf[0] = '\0'; bool result = CFStringGetCString( old, buf, size, kCFStringEncodingUTF8 ); sText = buf; diff --git a/src/RageUtil_CircularBuffer.h b/src/RageUtil_CircularBuffer.h index debc9ffc17..5f29305643 100644 --- a/src/RageUtil_CircularBuffer.h +++ b/src/RageUtil_CircularBuffer.h @@ -58,7 +58,7 @@ public: m_iBlockSize = cpy.m_iBlockSize; if( size ) { - buf = smnew T[size]; + buf = new T[size]; memcpy( buf, cpy.buf, size*sizeof(T) ); } else @@ -123,7 +123,7 @@ public: size = n+1; size = ((size + iBlockSize - 1) / iBlockSize) * iBlockSize; // round up - buf = smnew T[size]; + buf = new T[size]; } else size = 0; diff --git a/src/RageUtil_FileDB.cpp b/src/RageUtil_FileDB.cpp index 6e80d0bf68..4997fe560a 100644 --- a/src/RageUtil_FileDB.cpp +++ b/src/RageUtil_FileDB.cpp @@ -326,7 +326,7 @@ FileSet *FilenameDB::GetFileSet( const RString &sDir_, bool bCreate ) /* Create the FileSet and insert it. Set it to !m_bFilled, so if other threads * happen to try to use this directory before we finish filling it, they'll wait. */ - FileSet *pRet = smnew FileSet; + FileSet *pRet = new FileSet; pRet->m_bFilled = false; dirs[sLower] = pRet; diff --git a/src/RandomSample.cpp b/src/RandomSample.cpp index 1fdc71f5a2..fb593f67d2 100644 --- a/src/RandomSample.cpp +++ b/src/RandomSample.cpp @@ -69,7 +69,7 @@ bool RandomSample::LoadSound( RString sSoundFilePath ) { LOG->Trace( "RandomSample::LoadSound( %s )", sSoundFilePath.c_str() ); - RageSound *pSS = smnew RageSound; + RageSound *pSS = new RageSound; if( !pSS->Load(sSoundFilePath) ) { LOG->Trace( "Error loading \"%s\": %s", sSoundFilePath.c_str(), pSS->GetError().c_str() ); diff --git a/src/ReceptorArrowRow.cpp b/src/ReceptorArrowRow.cpp index 3fb9f3607d..276c63eb90 100644 --- a/src/ReceptorArrowRow.cpp +++ b/src/ReceptorArrowRow.cpp @@ -23,7 +23,7 @@ void ReceptorArrowRow::Load( const PlayerState* pPlayerState, float fYReverseOff for( int c=0; cm_iColsPerPlayer; c++ ) { - m_ReceptorArrow.push_back( smnew ReceptorArrow ); + m_ReceptorArrow.push_back( new ReceptorArrow ); m_ReceptorArrow[c]->SetName( "ReceptorArrow" ); m_ReceptorArrow[c]->Load( m_pPlayerState, c ); this->AddChild( m_ReceptorArrow[c] ); diff --git a/src/RoomInfoDisplay.cpp b/src/RoomInfoDisplay.cpp index fe27385560..847db6846f 100644 --- a/src/RoomInfoDisplay.cpp +++ b/src/RoomInfoDisplay.cpp @@ -176,7 +176,7 @@ void RoomInfoDisplay::SetRoomInfo( const RoomInfo& info) m_playerList.resize(info.players.size()); for (size_t i = oldsize; i < m_playerList.size(); i++) { - m_playerList[i] = smnew BitmapText; + m_playerList[i] = new BitmapText; m_playerList[i]->LoadFromFont( THEME->GetPathF(GetName(),"text") ); m_playerList[i]->SetName("PlayerListElement"); m_playerList[i]->SetHorizAlign( align_left ); diff --git a/src/RoomWheel.cpp b/src/RoomWheel.cpp index b6ce9e2093..80313dfbb1 100644 --- a/src/RoomWheel.cpp +++ b/src/RoomWheel.cpp @@ -29,7 +29,7 @@ void RoomWheel::Load( RString sType ) m_offset = 0; LOG->Trace( "RoomWheel::Load('%s')", sType.c_str() ); - AddPermanentItem( smnew RoomWheelItemData(WheelItemDataType_Generic, "Create Room", "Create a new game room", THEME->GetMetricC( m_sName, "CreateRoomColor")) ); + AddPermanentItem( new RoomWheelItemData(WheelItemDataType_Generic, "Create Room", "Create a new game room", THEME->GetMetricC( m_sName, "CreateRoomColor")) ); BuildWheelItemsData( m_CurWheelItemData ); RebuildWheelItems(); @@ -37,7 +37,7 @@ void RoomWheel::Load( RString sType ) WheelItemBase *RoomWheel::MakeItem() { - return smnew RoomWheelItem; + return new RoomWheelItem; } RoomWheelItem::RoomWheelItem( RString sType ): @@ -90,7 +90,7 @@ void RoomWheelItem::Load( RString sType ) void RoomWheel::BuildWheelItemsData( vector &arrayWheelItemDatas ) { if( arrayWheelItemDatas.empty() ) - arrayWheelItemDatas.push_back( smnew RoomWheelItemData(WheelItemDataType_Generic, EMPTY_STRING, "", RageColor(1,0,0,1)) ); + arrayWheelItemDatas.push_back( new RoomWheelItemData(WheelItemDataType_Generic, EMPTY_STRING, "", RageColor(1,0,0,1)) ); } void RoomWheel::AddPermanentItem( RoomWheelItemData *itemdata ) @@ -137,7 +137,7 @@ void RoomWheel::RemoveItem( int index ) if( m_CurWheelItemData.size() < 1 ) { m_bEmpty = true; - m_CurWheelItemData.push_back( smnew WheelItemBaseData(WheelItemDataType_Generic, "- EMPTY -", RageColor(1,0,0,1)) ); + m_CurWheelItemData.push_back( new WheelItemBaseData(WheelItemDataType_Generic, "- EMPTY -", RageColor(1,0,0,1)) ); } RebuildWheelItems(); diff --git a/src/RoomWheel.h b/src/RoomWheel.h index 1ca490b76c..ff6a12d18f 100644 --- a/src/RoomWheel.h +++ b/src/RoomWheel.h @@ -25,7 +25,7 @@ public: void Load( RString sType ); virtual void LoadFromWheelItemData( const WheelItemBaseData* pWID, int iIndex, bool bHasFocus, int iDrawIndex ); - virtual RoomWheelItem *Copy() const { return smnew RoomWheelItem(*this); } + virtual RoomWheelItem *Copy() const { return new RoomWheelItem(*this); } private: AutoActor m_sprNormalPart; diff --git a/src/ScoreKeeper.cpp b/src/ScoreKeeper.cpp index f04308522d..2a0825c614 100644 --- a/src/ScoreKeeper.cpp +++ b/src/ScoreKeeper.cpp @@ -34,11 +34,11 @@ void ScoreKeeper::GetScoreOfLastTapInRow( const NoteData &nd, int iRow, ScoreKeeper* ScoreKeeper::MakeScoreKeeper( RString sClassName, PlayerState *pPlayerState, PlayerStageStats *pPlayerStageStats ) { if( sClassName == "ScoreKeeperNormal" ) - return smnew ScoreKeeperNormal( pPlayerState, pPlayerStageStats ); + return new ScoreKeeperNormal( pPlayerState, pPlayerStageStats ); else if( sClassName == "ScoreKeeperRave" ) - return smnew ScoreKeeperRave( pPlayerState, pPlayerStageStats ); + return new ScoreKeeperRave( pPlayerState, pPlayerStageStats ); else if( sClassName == "ScoreKeeperShared" ) - return smnew ScoreKeeperShared( pPlayerState, pPlayerStageStats ); + return new ScoreKeeperShared( pPlayerState, pPlayerStageStats ); FAIL_M( ssprintf("Invalid ScoreKeeper named %s!", sClassName.c_str() )); } diff --git a/src/Screen.h b/src/Screen.h index 67f820b06d..31e1939f2d 100644 --- a/src/Screen.h +++ b/src/Screen.h @@ -21,7 +21,7 @@ typedef Screen* (*CreateScreenFn)(const RString& sClassName); */ struct RegisterScreenClass { RegisterScreenClass( const RString &sClassName, CreateScreenFn pfn ); }; #define REGISTER_SCREEN_CLASS( className ) \ - static Screen* Create##className( const RString &sName ) { LuaThreadVariable var( "LoadingScreen", sName ); Screen *pRet = smnew className; pRet->SetName( sName ); Screen::InitScreen( pRet ); return pRet; } \ + static Screen* Create##className( const RString &sName ) { LuaThreadVariable var( "LoadingScreen", sName ); Screen *pRet = new className; pRet->SetName( sName ); Screen::InitScreen( pRet ); return pRet; } \ static RegisterScreenClass register_##className( #className, Create##className ) /** @brief The different types of screens available. */ diff --git a/src/ScreenDebugOverlay.cpp b/src/ScreenDebugOverlay.cpp index 74c8e16cba..93a5be7c2c 100644 --- a/src/ScreenDebugOverlay.cpp +++ b/src/ScreenDebugOverlay.cpp @@ -263,7 +263,7 @@ void ScreenDebugOverlay::Init() RString sButton = INPUTMAN->GetDeviceSpecificInputString( di ); - BitmapText *p = smnew BitmapText; + BitmapText *p = new BitmapText; p->SetName( "PageText" ); p->LoadFromFont( THEME->GetPathF("ScreenDebugOverlay", "page") ); LOAD_ALL_COMMANDS_AND_ON_COMMAND( p ); @@ -277,7 +277,7 @@ void ScreenDebugOverlay::Init() FOREACH_CONST( IDebugLine*, GetSubscribers(), p ) { { - BitmapText *bt = smnew BitmapText; + BitmapText *bt = new BitmapText; bt->SetName( "ButtonText" ); bt->LoadFromFont( THEME->GetPathF("ScreenDebugOverlay", "line") ); bt->SetHorizAlign( align_right ); @@ -287,7 +287,7 @@ void ScreenDebugOverlay::Init() this->AddChild( bt ); } { - BitmapText *bt = smnew BitmapText; + BitmapText *bt = new BitmapText; bt->SetName( "FunctionText" ); bt->LoadFromFont( THEME->GetPathF("ScreenDebugOverlay", "line") ); bt->SetHorizAlign( align_left ); diff --git a/src/ScreenGameplay.cpp b/src/ScreenGameplay.cpp index b77fe4eddb..13a186c11d 100644 --- a/src/ScreenGameplay.cpp +++ b/src/ScreenGameplay.cpp @@ -129,16 +129,16 @@ void PlayerInfo::Load( PlayerNumber pn, MultiPlayer mp, bool bShowNoteField, int case PLAY_MODE_BATTLE: case PLAY_MODE_RAVE: if( PREFSMAN->m_bPercentageScoring ) - m_pPrimaryScoreDisplay = smnew ScoreDisplayPercentage; + m_pPrimaryScoreDisplay = new ScoreDisplayPercentage; else - m_pPrimaryScoreDisplay = smnew ScoreDisplayNormal; + m_pPrimaryScoreDisplay = new ScoreDisplayNormal; break; case PLAY_MODE_ONI: case PLAY_MODE_ENDLESS: if( GAMESTATE->m_SongOptions.GetStage().m_LifeType == SongOptions::LIFE_TIME ) - m_pPrimaryScoreDisplay = smnew ScoreDisplayLifeTime; + m_pPrimaryScoreDisplay = new ScoreDisplayLifeTime; else - m_pPrimaryScoreDisplay = smnew ScoreDisplayOni; + m_pPrimaryScoreDisplay = new ScoreDisplayOni; break; default: FAIL_M(ssprintf("Invalid PlayMode: %i", mode)); @@ -154,7 +154,7 @@ void PlayerInfo::Load( PlayerNumber pn, MultiPlayer mp, bool bShowNoteField, int switch( GAMESTATE->m_PlayMode ) { case PLAY_MODE_RAVE: - m_pSecondaryScoreDisplay = smnew ScoreDisplayRave; + m_pSecondaryScoreDisplay = new ScoreDisplayRave; m_pSecondaryScoreDisplay->SetName( "ScoreDisplayRave" ); default: break; @@ -168,14 +168,14 @@ void PlayerInfo::Load( PlayerNumber pn, MultiPlayer mp, bool bShowNoteField, int switch( GAMESTATE->m_PlayMode ) { case PLAY_MODE_RAVE: - m_pSecondaryScoreKeeper = smnew ScoreKeeperRave( pPlayerState, pPlayerStageStats ); + m_pSecondaryScoreKeeper = new ScoreKeeperRave( pPlayerState, pPlayerStageStats ); default: break; } m_ptextPlayerOptions = NULL; m_pActiveAttackList = NULL; - m_pPlayer = smnew Player( m_NoteData, bShowNoteField ); + m_pPlayer = new Player( m_NoteData, bShowNoteField ); m_pInventory = NULL; m_pStepsDisplay = NULL; @@ -194,7 +194,7 @@ void PlayerInfo::LoadDummyP1( int iDummyIndex, int iAddToDifficulty ) m_iAddToDifficulty = iAddToDifficulty; // don't init any of the scoring objects - m_pPlayer = smnew Player( m_NoteData, true ); + m_pPlayer = new Player( m_NoteData, true ); // PlayerOptions needs to be set now so that we load the correct NoteSkin. m_PlayerStateDummy = *GAMESTATE->m_pPlayerState[PLAYER_1]; @@ -352,8 +352,8 @@ void ScreenGameplay::Init() if( UseSongBackgroundAndForeground() ) { - m_pSongBackground = smnew Background; - m_pSongForeground = smnew Foreground; + m_pSongBackground = new Background; + m_pSongForeground = new Foreground; } ScreenWithMenuElements::Init(); @@ -528,7 +528,7 @@ void ScreenGameplay::Init() { case PLAY_MODE_BATTLE: case PLAY_MODE_RAVE: - m_pCombinedLifeMeter = smnew CombinedLifeMeterTug; + m_pCombinedLifeMeter = new CombinedLifeMeterTug; m_pCombinedLifeMeter->SetName( "CombinedLife" ); LOAD_ALL_COMMANDS_AND_SET_XY( *m_pCombinedLifeMeter ); this->AddChild( m_pCombinedLifeMeter ); @@ -629,7 +629,7 @@ void ScreenGameplay::Init() { ASSERT( pi->m_ptextCourseSongNumber == NULL ); SONG_NUMBER_FORMAT.Load( m_sName, "SongNumberFormat" ); - pi->m_ptextCourseSongNumber = smnew BitmapText; + pi->m_ptextCourseSongNumber = new BitmapText; pi->m_ptextCourseSongNumber->LoadFromFont( THEME->GetPathF(m_sName,"SongNum") ); pi->m_ptextCourseSongNumber->SetName( ssprintf("SongNumber%s",pi->GetName().c_str()) ); LOAD_ALL_COMMANDS_AND_SET_XY( pi->m_ptextCourseSongNumber ); @@ -639,7 +639,7 @@ void ScreenGameplay::Init() } ASSERT( pi->m_ptextStepsDescription == NULL ); - pi->m_ptextStepsDescription = smnew BitmapText; + pi->m_ptextStepsDescription = new BitmapText; pi->m_ptextStepsDescription->LoadFromFont( THEME->GetPathF(m_sName,"StepsDescription") ); pi->m_ptextStepsDescription->SetName( ssprintf("StepsDescription%s",pi->GetName().c_str()) ); LOAD_ALL_COMMANDS_AND_SET_XY( pi->m_ptextStepsDescription ); @@ -647,7 +647,7 @@ void ScreenGameplay::Init() // Player/Song options ASSERT( pi->m_ptextPlayerOptions == NULL ); - pi->m_ptextPlayerOptions = smnew BitmapText; + pi->m_ptextPlayerOptions = new BitmapText; pi->m_ptextPlayerOptions->LoadFromFont( THEME->GetPathF(m_sName,"player options") ); pi->m_ptextPlayerOptions->SetName( ssprintf("PlayerOptions%s",pi->GetName().c_str()) ); LOAD_ALL_COMMANDS_AND_SET_XY( pi->m_ptextPlayerOptions ); @@ -655,7 +655,7 @@ void ScreenGameplay::Init() // Difficulty icon and meter ASSERT( pi->m_pStepsDisplay == NULL ); - pi->m_pStepsDisplay = smnew StepsDisplay; + pi->m_pStepsDisplay = new StepsDisplay; pi->m_pStepsDisplay->Load("StepsDisplayGameplay", pi->GetPlayerState() ); pi->m_pStepsDisplay->SetName( ssprintf("StepsDisplay%s",pi->GetName().c_str()) ); PlayerNumber pn = pi->GetStepsAndTrailIndex(); @@ -668,7 +668,7 @@ void ScreenGameplay::Init() switch( GAMESTATE->m_PlayMode ) { case PLAY_MODE_BATTLE: - pi->m_pInventory = smnew Inventory; + pi->m_pInventory = new Inventory; pi->m_pInventory->Load( p ); this->AddChild( pi->m_pInventory ); break; @@ -686,7 +686,7 @@ void ScreenGameplay::Init() FOREACH_VisiblePlayerInfo( m_vPlayerInfo, pi ) { ASSERT( pi->m_pActiveAttackList == NULL ); - pi->m_pActiveAttackList = smnew ActiveAttackList; + pi->m_pActiveAttackList = new ActiveAttackList; pi->m_pActiveAttackList->LoadFromFont( THEME->GetPathF(m_sName,"ActiveAttackList") ); pi->m_pActiveAttackList->Init( pi->GetPlayerState() ); pi->m_pActiveAttackList->SetName( ssprintf("ActiveAttackList%s",pi->GetName().c_str()) ); @@ -2756,7 +2756,7 @@ void ScreenGameplay::SaveReplay() { Profile *pTempProfile = PROFILEMAN->GetProfile(pn); - XNode *p = smnew XNode("ReplayData"); + XNode *p = new XNode("ReplayData"); // append version number (in case the format changes) p->AppendAttr("Version",0); @@ -2777,7 +2777,7 @@ void ScreenGameplay::SaveReplay() p->AppendChild(pStepsInfoNode); // player information node (rival data sup) - XNode *pPlayerInfoNode = smnew XNode("Player"); + XNode *pPlayerInfoNode = new XNode("Player"); pPlayerInfoNode->AppendChild("DisplayName", pTempProfile->m_sDisplayName); pPlayerInfoNode->AppendChild("Guid", pTempProfile->m_sGuid); p->AppendChild(pPlayerInfoNode); diff --git a/src/ScreenHowToPlay.cpp b/src/ScreenHowToPlay.cpp index 2c3b76c422..2daf79084e 100644 --- a/src/ScreenHowToPlay.cpp +++ b/src/ScreenHowToPlay.cpp @@ -80,7 +80,7 @@ void ScreenHowToPlay::Init() if( (bool)USE_PAD && DoesFileExist( GetAnimPath(ANIM_DANCE_PAD) ) ) { - m_pmDancePad = smnew Model; + m_pmDancePad = new Model; m_pmDancePad->SetName( "Pad" ); m_pmDancePad->LoadMilkshapeAscii( GetAnimPath(ANIM_DANCE_PAD) ); // xxx: hardcoded rotation. can be undone, but still. -freem @@ -102,7 +102,7 @@ void ScreenHowToPlay::Init() RString sModelPath = displayChar->GetModelPath(); if( sModelPath != "" ) { - m_pmCharacter = smnew Model; + m_pmCharacter = new Model; m_pmCharacter->SetName( "Character" ); m_pmCharacter->LoadMilkshapeAscii( displayChar->GetModelPath() ); m_pmCharacter->LoadMilkshapeAsciiBones( "Step-LEFT", GetAnimPath( ANIM_LEFT ) ); @@ -130,7 +130,7 @@ void ScreenHowToPlay::Init() { GAMESTATE->SetMasterPlayerNumber(PLAYER_1); - m_pLifeMeterBar = smnew LifeMeterBar; + m_pLifeMeterBar = new LifeMeterBar; m_pLifeMeterBar->Load( GAMESTATE->m_pPlayerState[PLAYER_1], &STATSMAN->m_CurStageStats.m_player[PLAYER_1] ); m_pLifeMeterBar->SetName("LifeMeterBar"); ActorUtil::LoadAllCommandsAndSetXY( m_pLifeMeterBar, m_sName ); diff --git a/src/ScreenInstallOverlay.cpp b/src/ScreenInstallOverlay.cpp index de29337fae..191616bd03 100644 --- a/src/ScreenInstallOverlay.cpp +++ b/src/ScreenInstallOverlay.cpp @@ -143,7 +143,7 @@ public: DownloadTask(const RString &sControlFileUri) { //SCREENMAN->SystemMessage( "Downloading control file." ); - m_pTransfer = smnew FileTransfer(); + m_pTransfer = new FileTransfer(); m_pTransfer->StartDownload( sControlFileUri, "" ); m_DownloadState = control; } @@ -226,7 +226,7 @@ public: m_vsQueuedPackageUrls.pop_back(); m_sCurrentPackageTempFile = MakeTempFileName(sUrl); ASSERT(m_pTransfer == NULL); - m_pTransfer = smnew FileTransfer(); + m_pTransfer = new FileTransfer(); m_pTransfer->StartDownload( sUrl, m_sCurrentPackageTempFile ); } } @@ -245,7 +245,7 @@ public: m_vsQueuedPackageUrls.pop_back(); m_sCurrentPackageTempFile = MakeTempFileName(sUrl); ASSERT(m_pTransfer == NULL); - m_pTransfer = smnew FileTransfer(); + m_pTransfer = new FileTransfer(); m_pTransfer->StartDownload( sUrl, m_sCurrentPackageTempFile ); } } @@ -294,7 +294,7 @@ PlayAfterLaunchInfo DoInstalls( CommandLineActions::CommandLineArgs args ) { RString s = args.argv[i]; if( IsStepManiaProtocol(s) ) - g_pDownloadTasks.push_back( smnew DownloadTask(s) ); + g_pDownloadTasks.push_back( new DownloadTask(s) ); else if( IsPackageFile(s) ) InstallSmzipOsArg(s, ret); } diff --git a/src/ScreenManager.cpp b/src/ScreenManager.cpp index 8aae275fc4..a52836c07e 100644 --- a/src/ScreenManager.cpp +++ b/src/ScreenManager.cpp @@ -243,7 +243,7 @@ ScreenManager::ScreenManager() LUA->Release( L ); } - g_pSharedBGA = smnew Actor; + g_pSharedBGA = new Actor; m_bZeroNextUpdate = false; m_PopTopScreen = SM_Invalid; @@ -306,7 +306,7 @@ void ScreenManager::ThemeChanged() // force recreate of new BGA SAFE_DELETE( g_pSharedBGA ); - g_pSharedBGA = smnew Actor; + g_pSharedBGA = new Actor; this->RefreshCreditsMessages(); } @@ -647,7 +647,7 @@ bool ScreenManager::ActivatePreparedScreenAndBackground( const RString &sScreenN Actor *pNewBGA = NULL; if( sNewBGA.empty() ) { - pNewBGA = smnew Actor; + pNewBGA = new Actor; } else { @@ -667,7 +667,7 @@ bool ScreenManager::ActivatePreparedScreenAndBackground( const RString &sScreenN if( pNewBGA == NULL ) { bLoadedBoth = false; - pNewBGA = smnew Actor; + pNewBGA = new Actor; } /* Move the old background back to the prepared list, or delete it if diff --git a/src/ScreenMapControllers.cpp b/src/ScreenMapControllers.cpp index 4a7a094713..ed9fe0965a 100644 --- a/src/ScreenMapControllers.cpp +++ b/src/ScreenMapControllers.cpp @@ -90,7 +90,7 @@ void ScreenMapControllers::Init() KeyToMap *pKey = &m_KeysToMap[b]; { - BitmapText *pName = smnew BitmapText; + BitmapText *pName = new BitmapText; pName->SetName( "Primary" ); pName->LoadFromFont( THEME->GetPathF(m_sName,"title") ); RString sText = GameButtonToLocalizedString( INPUTMAPPER->GetInputScheme(), pKey->m_GameButton ); @@ -99,7 +99,7 @@ void ScreenMapControllers::Init() m_Line[iRow].AddChild( pName ); } { - BitmapText *pSecondary = smnew BitmapText; + BitmapText *pSecondary = new BitmapText; pSecondary->SetName( "Secondary" ); pSecondary->LoadFromFont( THEME->GetPathF(m_sName,"title") ); GameButton mb = INPUTMAPPER->GetInputScheme()->GameButtonToMenuButton( pKey->m_GameButton ); @@ -115,7 +115,7 @@ void ScreenMapControllers::Init() { for( int s=0; sm_textMappedTo[c][s] = smnew BitmapText; + pKey->m_textMappedTo[c][s] = new BitmapText; pKey->m_textMappedTo[c][s]->SetName( "MappedTo" ); pKey->m_textMappedTo[c][s]->LoadFromFont( THEME->GetPathF(m_sName,"entry") ); pKey->m_textMappedTo[c][s]->RunCommands( MAPPED_TO_COMMAND(c,s) ); diff --git a/src/ScreenNetRoom.cpp b/src/ScreenNetRoom.cpp index c313f230b2..792d9ed7af 100644 --- a/src/ScreenNetRoom.cpp +++ b/src/ScreenNetRoom.cpp @@ -265,13 +265,13 @@ void ScreenNetRoom::UpdateRoomsList() { difference = abs( difference ); for( int x = 0; x < difference; ++x ) - m_RoomWheel.AddItem( smnew RoomWheelItemData(WheelItemDataType_Generic, "", "", RageColor(1,1,1,1)) ); + m_RoomWheel.AddItem( new RoomWheelItemData(WheelItemDataType_Generic, "", "", RageColor(1,1,1,1)) ); } } else { for ( unsigned int x = 0; x < m_Rooms.size(); ++x) - m_RoomWheel.AddItem( smnew RoomWheelItemData(WheelItemDataType_Generic, "", "", RageColor(1,1,1,1)) ); + m_RoomWheel.AddItem( new RoomWheelItemData(WheelItemDataType_Generic, "", "", RageColor(1,1,1,1)) ); } for( unsigned int i = 0; i < m_Rooms.size(); ++i ) diff --git a/src/ScreenOptions.cpp b/src/ScreenOptions.cpp index cfdf638251..eb59b039d5 100644 --- a/src/ScreenOptions.cpp +++ b/src/ScreenOptions.cpp @@ -211,7 +211,7 @@ void ScreenOptions::InitMenu( const vector &vHands ) for( unsigned r=0; r &vHands ) if( SHOW_EXIT_ROW ) { - m_pRows.push_back( smnew OptionRow(&m_OptionRowTypeExit) ); + m_pRows.push_back( new OptionRow(&m_OptionRowTypeExit) ); OptionRow &row = *m_pRows.back(); row.LoadExit(); row.SetDrawOrder( 1 ); diff --git a/src/ScreenOptionsEditCourse.cpp b/src/ScreenOptionsEditCourse.cpp index 69fd78a28b..a489fc3839 100644 --- a/src/ScreenOptionsEditCourse.cpp +++ b/src/ScreenOptionsEditCourse.cpp @@ -213,7 +213,7 @@ void ScreenOptionsEditCourse::BeginScreen() } { - EditCourseOptionRowHandlerSteps *pHand = smnew EditCourseOptionRowHandlerSteps; + EditCourseOptionRowHandlerSteps *pHand = new EditCourseOptionRowHandlerSteps; pHand->Load( i ); pHand->m_Def.m_vsChoices.push_back( "n/a" ); pHand->m_Def.m_sName = ssprintf(STEPS.GetValue() + " %d",i+1); diff --git a/src/ScreenOptionsManageCourses.cpp b/src/ScreenOptionsManageCourses.cpp index a871346f02..96065642c2 100644 --- a/src/ScreenOptionsManageCourses.cpp +++ b/src/ScreenOptionsManageCourses.cpp @@ -159,7 +159,7 @@ void ScreenOptionsManageCourses::HandleScreenMessage( const ScreenMessage SM ) if( iCurRow == 0 ) // "create new" { /* Allocate the Course now, but don't save the file until the user explicitly chooses Save */ - Course *pCourse = smnew Course; + Course *pCourse = new Course; EditCourseUtil::LoadDefaults( *pCourse ); pCourse->m_LoadedFromProfile = ProfileSlot_Machine; SONGMAN->AddCourse( pCourse ); diff --git a/src/ScreenReloadSongs.cpp b/src/ScreenReloadSongs.cpp index c0d4bb662a..27a737cb2c 100644 --- a/src/ScreenReloadSongs.cpp +++ b/src/ScreenReloadSongs.cpp @@ -58,7 +58,7 @@ void ScreenReloadSongs::Init() m_Loading.SetXY( SCREEN_CENTER_X, SCREEN_CENTER_Y ); this->AddChild( &m_Loading ); - m_pLoadingWindow = smnew ScreenReloadSongsLoadingWindow( m_Loading ); + m_pLoadingWindow = new ScreenReloadSongsLoadingWindow( m_Loading ); } ScreenReloadSongs::~ScreenReloadSongs() diff --git a/src/ScreenTestSound.cpp b/src/ScreenTestSound.cpp index cb340ded3f..7d86c8b811 100644 --- a/src/ScreenTestSound.cpp +++ b/src/ScreenTestSound.cpp @@ -147,7 +147,7 @@ bool ScreenTestSound::Input( const InputEventPlus &input ) /* We want to be able to read the position of copied sounds; if we let * RageSound copy itself, then the copy will be owned by RageSoundManager * and we won't be allowed to touch it. Copy it ourself. */ - RageSound *pCopy = smnew RageSound( s[selected].s ); + RageSound *pCopy = new RageSound( s[selected].s ); m_sSoundCopies[selected].push_back( pCopy ); pCopy->Play(); break; diff --git a/src/ScreenUnlockStatus.cpp b/src/ScreenUnlockStatus.cpp index 1ac7cd211d..0aa9e6a776 100644 --- a/src/ScreenUnlockStatus.cpp +++ b/src/ScreenUnlockStatus.cpp @@ -53,7 +53,7 @@ void ScreenUnlockStatus::Init() if( pSong == NULL) continue; - Sprite* pSpr = smnew Sprite; + Sprite* pSpr = new Sprite; // new unlock graphic pSpr->Load( THEME->GetPathG("ScreenUnlockStatus",ssprintf("%04d icon", i)) ); @@ -94,7 +94,7 @@ void ScreenUnlockStatus::Init() { const UnlockEntry &entry = UNLOCKMAN->m_UnlockEntries[i-1]; - BitmapText* text = smnew BitmapText; + BitmapText* text = new BitmapText; text->LoadFromFont( THEME->GetPathF("ScreenUnlockStatus","text") ); text->SetHorizAlign( align_left ); @@ -169,7 +169,7 @@ void ScreenUnlockStatus::Init() if (UNLOCK_TEXT_SCROLL >= 2) { - Sprite* IconCount = smnew Sprite; + Sprite* IconCount = new Sprite; // new unlock graphic IconCount->Load( THEME->GetPathG("ScreenUnlockStatus",ssprintf("%04d icon", i)) ); @@ -232,7 +232,7 @@ void ScreenUnlockStatus::Init() if( pSong == NULL ) continue; - BitmapText* NewText = smnew BitmapText; + BitmapText* NewText = new BitmapText; NewText->LoadFromFont( THEME->GetPathF("ScreenUnlockStatus","text") ); NewText->SetHorizAlign( align_left ); @@ -256,7 +256,7 @@ void ScreenUnlockStatus::Init() } // new unlock graphic - Sprite* NewIcon = smnew Sprite; + Sprite* NewIcon = new Sprite; NewIcon->Load( THEME->GetPathG("ScreenUnlockStatus",ssprintf("%04d icon", NextIcon)) ); NewIcon->SetXY( UNLOCK_TEXT_SCROLL_ICON_X, ScrollingTextStartY); NewIcon->SetHeight(UNLOCK_TEXT_SCROLL_ICON_SIZE); diff --git a/src/ScreenWithMenuElements.cpp b/src/ScreenWithMenuElements.cpp index 67e7b47b18..5cde6d05d6 100644 --- a/src/ScreenWithMenuElements.cpp +++ b/src/ScreenWithMenuElements.cpp @@ -44,7 +44,7 @@ void ScreenWithMenuElements::Init() FOREACH_PlayerNumber( p ) { ASSERT( m_MemoryCardDisplay[p] == NULL ); - m_MemoryCardDisplay[p] = smnew MemoryCardDisplay; + m_MemoryCardDisplay[p] = new MemoryCardDisplay; m_MemoryCardDisplay[p]->Load( p ); m_MemoryCardDisplay[p]->SetName( ssprintf("MemoryCardDisplayP%d",p+1) ); LOAD_ALL_COMMANDS_AND_SET_XY( m_MemoryCardDisplay[p] ); @@ -55,7 +55,7 @@ void ScreenWithMenuElements::Init() if( TIMER_SECONDS != -1 ) { ASSERT( m_MenuTimer == NULL ); // don't load twice - m_MenuTimer = smnew MenuTimer; + m_MenuTimer = new MenuTimer; m_MenuTimer->Load( TIMER_METRICS_GROUP.GetValue() ); m_MenuTimer->SetName( "Timer" ); if( TIMER_STEALTH ) diff --git a/src/Song.cpp b/src/Song.cpp index a24b89eb2c..54b5241986 100644 --- a/src/Song.cpp +++ b/src/Song.cpp @@ -62,8 +62,8 @@ StringToX( InstrumentTrack ); Song::Song() { FOREACH_BackgroundLayer( i ) - m_BackgroundChanges[i] = AutoPtrCopyOnWrite(smnew VBackgroundChange); - m_ForegroundChanges = AutoPtrCopyOnWrite(smnew VBackgroundChange); + m_BackgroundChanges[i] = AutoPtrCopyOnWrite(new VBackgroundChange); + m_ForegroundChanges = AutoPtrCopyOnWrite(new VBackgroundChange); m_LoadedFromProfile = ProfileSlot_Invalid; m_fVersion = STEPFILE_VERSION_NUMBER; @@ -191,7 +191,7 @@ void Song::AddLyricSegment( LyricSegment seg ) Steps *Song::CreateSteps() { - Steps *pSteps = smnew Steps(this); + Steps *pSteps = new Steps(this); InitSteps( pSteps ); return pSteps; } @@ -415,7 +415,7 @@ bool Song::ReloadFromSongDir( RString sDir ) // The leftovers in the map are steps that didn't exist before we reverted for( map::const_iterator it = mNewSteps.begin(); it != mNewSteps.end(); ++it ) { - Steps *NewSteps = smnew Steps(this); + Steps *NewSteps = new Steps(this); *NewSteps = *(it->second); AddSteps( NewSteps ); } @@ -1135,7 +1135,7 @@ void Song::AutoGen( StepsType ntTo, StepsType ntFrom ) const Steps* pOriginalNotes = m_vpSteps[j]; if( pOriginalNotes->m_StepsType == ntFrom ) { - Steps* pNewNotes = smnew Steps(this); + Steps* pNewNotes = new Steps(this); pNewNotes->AutogenFrom( pOriginalNotes, ntTo ); this->AddSteps( pNewNotes ); } diff --git a/src/SongManager.cpp b/src/SongManager.cpp index b42f9e4a49..4450f1db85 100644 --- a/src/SongManager.cpp +++ b/src/SongManager.cpp @@ -308,7 +308,7 @@ void SongManager::LoadStepManiaSongDir( RString sDir, LoadingWindow *ld ) ) ); } - Song* pNewSong = smnew Song; + Song* pNewSong = new Song; m_pSongs.push_back( pNewSong ); if( !pNewSong->LoadFromSongDir( sSongDirName ) ) { @@ -359,7 +359,7 @@ void SongManager::LoadGroupSymLinks(RString sDir, RString sGroupFolder) msdF.ReadFile( sDir+sGroupFolder+"/"+arraySymLinks[s].c_str(), false ); // don't unescape RString sSymDestination = msdF.GetParam(0,1); // Should only be 1 value & param...period. - Song* pNewSong = smnew Song; + Song* pNewSong = new Song; if( !pNewSong->LoadFromSongDir( sSymDestination ) ) { delete pNewSong; // The song failed to load. @@ -823,7 +823,7 @@ void SongManager::InitCoursesFromDisk( LoadingWindow *ld ) Basename(*sCoursePath).c_str())); } - Course* pCourse = smnew Course; + Course* pCourse = new Course; CourseLoaderCRS::LoadFromCRSFile( *sCoursePath, *pCourse ); if( g_bHideIncompleteCourses.Get() && pCourse->m_bIncomplete ) @@ -855,12 +855,12 @@ void SongManager::InitAutogenCourses() RString sGroupName = saGroupNames[g]; // Generate random courses from each group. - pCourse = smnew Course; + pCourse = new Course; CourseUtil::AutogenEndlessFromGroup( sGroupName, Difficulty_Medium, *pCourse ); pCourse->m_sScripter = "Autogen"; m_pCourses.push_back( pCourse ); - pCourse = smnew Course; + pCourse = new Course; CourseUtil::AutogenNonstopFromGroup( sGroupName, Difficulty_Medium, *pCourse ); pCourse->m_sScripter = "Autogen"; m_pCourses.push_back( pCourse ); @@ -869,7 +869,7 @@ void SongManager::InitAutogenCourses() vector apCourseSongs = GetAllSongs(); // Generate "All Songs" endless course. - pCourse = smnew Course; + pCourse = new Course; CourseUtil::AutogenEndlessFromGroup( "", Difficulty_Medium, *pCourse ); pCourse->m_sScripter = "Autogen"; m_pCourses.push_back( pCourse ); @@ -905,7 +905,7 @@ void SongManager::InitAutogenCourses() sCurArtistTranslit.CompareNoCase("Unknown artist") && sCurArtist.CompareNoCase("Unknown artist") ) { - pCourse = smnew Course; + pCourse = new Course; CourseUtil::AutogenOniFromArtist( sCurArtist, sCurArtistTranslit, aSongs, Difficulty_Hard, *pCourse ); pCourse->m_sScripter = "Autogen"; m_pCourses.push_back( pCourse ); diff --git a/src/SongUtil.cpp b/src/SongUtil.cpp index 6f3cf83985..eb57e74288 100644 --- a/src/SongUtil.cpp +++ b/src/SongUtil.cpp @@ -1112,7 +1112,7 @@ Song *SongID::ToSong() const XNode* SongID::CreateNode() const { - XNode* pNode = smnew XNode( "Song" ); + XNode* pNode = new XNode( "Song" ); pNode->AppendAttr( "Dir", sDir ); return pNode; } diff --git a/src/StatsManager.cpp b/src/StatsManager.cpp index 635c49c880..ade50e7b5a 100644 --- a/src/StatsManager.cpp +++ b/src/StatsManager.cpp @@ -168,7 +168,7 @@ XNode* MakeRecentScoreNode( const StageStats &ss, Trail *pTrail, const PlayerSta XNode* pNode = NULL; if( GAMESTATE->IsCourseMode() ) { - pNode = smnew XNode( "HighScoreForACourseAndTrail" ); + pNode = new XNode( "HighScoreForACourseAndTrail" ); CourseID courseID; courseID.FromCourse(GAMESTATE->m_pCurCourse ); @@ -181,7 +181,7 @@ XNode* MakeRecentScoreNode( const StageStats &ss, Trail *pTrail, const PlayerSta } else { - pNode = smnew XNode( "HighScoreForASongAndSteps" ); + pNode = new XNode( "HighScoreForASongAndSteps" ); SongID songID; songID.FromSong( ss.m_vpPossibleSongs[0] ); @@ -257,14 +257,14 @@ void StatsManager::CommitStatsToProfiles( const StageStats *pSS ) // Save recent scores { - auto_ptr xml( smnew XNode("Stats") ); + auto_ptr xml( new XNode("Stats") ); xml->AppendChild( "MachineGuid", PROFILEMAN->GetMachineProfile()->m_sGuid ); XNode *recent = NULL; if( GAMESTATE->IsCourseMode() ) - recent = xml->AppendChild( smnew XNode("RecentCourseScores") ); + recent = xml->AppendChild( new XNode("RecentCourseScores") ); else - recent = xml->AppendChild( smnew XNode("RecentSongScores") ); + recent = xml->AppendChild( new XNode("RecentSongScores") ); if(!GAMESTATE->m_bMultiplayer) { diff --git a/src/StepMania.cpp b/src/StepMania.cpp index 8b79ccc216..6995a2cc86 100644 --- a/src/StepMania.cpp +++ b/src/StepMania.cpp @@ -188,7 +188,7 @@ static void StartDisplay() PREFSMAN->m_fCenterImageAddWidth, PREFSMAN->m_fCenterImageAddHeight ); - TEXTUREMAN = smnew RageTextureManager; + TEXTUREMAN = new RageTextureManager; TEXTUREMAN->SetPrefs( RageTextureManagerPrefs( PREFSMAN->m_iTextureColorDepth, @@ -200,7 +200,7 @@ static void StartDisplay() ) ); - MODELMAN = smnew ModelManager; + MODELMAN = new ModelManager; MODELMAN->SetPrefs( ModelManagerPrefs( PREFSMAN->m_bDelayedModelDelete @@ -740,25 +740,25 @@ RageDisplay *CreateDisplay() if( sRenderer.CompareNoCase("opengl")==0 ) { #if defined(SUPPORT_OPENGL) - pRet = smnew RageDisplay_Legacy; + pRet = new RageDisplay_Legacy; #endif } else if( sRenderer.CompareNoCase("gles2")==0 ) { #if defined(SUPPORT_GLES2) - pRet = smnew RageDisplay_GLES2; + pRet = new RageDisplay_GLES2; #endif } else if( sRenderer.CompareNoCase("d3d")==0 ) { // TODO: ANGLE/RageDisplay_Modern #if defined(SUPPORT_D3D) - pRet = smnew RageDisplay_D3D; + pRet = new RageDisplay_D3D; #endif } else if( sRenderer.CompareNoCase("null")==0 ) { - return smnew RageDisplay_Null; + return new RageDisplay_Null; } else { @@ -941,11 +941,6 @@ static LocalizedString COULDNT_OPEN_LOADING_WINDOW( "LoadingWindow", "Couldn't o int main(int argc, char* argv[]) { -#if _DEBUG - // This will dump any memory leaks to the debug output when the application closes. - _CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF ); -#endif - RageThreadRegister thread( "Main thread" ); RageException::SetCleanupHandler( HandleException ); @@ -955,10 +950,10 @@ int main(int argc, char* argv[]) HOOKS = ArchHooks::Create(); HOOKS->Init(); - LUA = smnew LuaManager; + LUA = new LuaManager; // Almost everything uses this to read and write files. Load this early. - FILEMAN = smnew RageFileManager( argv[0] ); + FILEMAN = new RageFileManager( argv[0] ); FILEMAN->MountInitialFilesystems(); bool bPortable = DoesFileExist("Portable.ini"); @@ -966,12 +961,12 @@ int main(int argc, char* argv[]) FILEMAN->MountUserFilesystems(); // Set this up next. Do this early, since it's needed for RageException::Throw. - LOG = smnew RageLog; + LOG = new RageLog; // Whew--we should be able to crash safely now! // load preferences and mount any alternative trees. - PREFSMAN = smnew PrefsManager; + PREFSMAN = new PrefsManager; /* Allow HOOKS to check for multiple instances. We need to do this after PREFS is initialized, * so ArchHooks can use a preference to turn this off. We want to do this before ApplyLogPreferences, @@ -1023,7 +1018,7 @@ int main(int argc, char* argv[]) // Create game objects - GAMESTATE = smnew GameState; + GAMESTATE = new GameState; // This requires PREFSMAN, for PREFSMAN->m_bShowLoadingWindow. LoadingWindow *pLoadingWindow = LoadingWindow::Create(); @@ -1044,10 +1039,10 @@ int main(int argc, char* argv[]) AdjustForChangedSystemCapabilities(); - GAMEMAN = smnew GameManager; - THEME = smnew ThemeManager; - ANNOUNCER = smnew AnnouncerManager; - NOTESKIN = smnew NoteSkinManager; + GAMEMAN = new GameManager; + THEME = new ThemeManager; + ANNOUNCER = new AnnouncerManager; + NOTESKIN = new NoteSkinManager; // Switch to the last used game type, and set up the theme and announcer. SwitchToLastPlayedGame(); @@ -1111,37 +1106,37 @@ int main(int argc, char* argv[]) if( PREFSMAN->m_iSoundWriteAhead ) LOG->Info( "Sound writeahead has been overridden to %i", PREFSMAN->m_iSoundWriteAhead.Get() ); - SOUNDMAN = smnew RageSoundManager; + SOUNDMAN = new RageSoundManager; SOUNDMAN->Init(); SOUNDMAN->SetMixVolume(); - SOUND = smnew GameSoundManager; - LIGHTSMAN = smnew LightsManager; - INPUTFILTER = smnew InputFilter; - INPUTMAPPER = smnew InputMapper; + SOUND = new GameSoundManager; + LIGHTSMAN = new LightsManager; + INPUTFILTER = new InputFilter; + INPUTMAPPER = new InputMapper; StepMania::ChangeCurrentGame( GAMESTATE->GetCurrentGame() ); - INPUTQUEUE = smnew InputQueue; - SONGINDEX = smnew SongCacheIndex; - BANNERCACHE = smnew BannerCache; - //BACKGROUNDCACHE = smnew BackgroundCache; + INPUTQUEUE = new InputQueue; + SONGINDEX = new SongCacheIndex; + BANNERCACHE = new BannerCache; + //BACKGROUNDCACHE = new BackgroundCache; // depends on SONGINDEX: - SONGMAN = smnew SongManager; + SONGMAN = new SongManager; SONGMAN->InitAll( pLoadingWindow ); // this takes a long time - CRYPTMAN = smnew CryptManager; // need to do this before ProfileMan + CRYPTMAN = new CryptManager; // need to do this before ProfileMan if( PREFSMAN->m_bSignProfileData ) CRYPTMAN->GenerateGlobalKeys(); - MEMCARDMAN = smnew MemoryCardManager; - CHARMAN = smnew CharacterManager; - PROFILEMAN = smnew ProfileManager; + MEMCARDMAN = new MemoryCardManager; + CHARMAN = new CharacterManager; + PROFILEMAN = new ProfileManager; PROFILEMAN->Init(); // must load after SONGMAN - UNLOCKMAN = smnew UnlockManager; + UNLOCKMAN = new UnlockManager; SONGMAN->UpdatePopular(); SONGMAN->UpdatePreferredSort(); - NSMAN = smnew NetworkSyncManager( pLoadingWindow ); - MESSAGEMAN = smnew MessageManager; - STATSMAN = smnew StatsManager; + NSMAN = new NetworkSyncManager( pLoadingWindow ); + MESSAGEMAN = new MessageManager; + STATSMAN = new StatsManager; // Initialize which courses are ranking courses here. SONGMAN->UpdateRankingCourses(); @@ -1165,11 +1160,11 @@ int main(int argc, char* argv[]) /* Input handlers can have dependences on the video system so * INPUTMAN must be initialized after DISPLAY. */ - INPUTMAN = smnew RageInput; + INPUTMAN = new RageInput; // These things depend on the TextureManager, so do them after! - FONT = smnew FontManager; - SCREENMAN = smnew ScreenManager; + FONT = new FontManager; + SCREENMAN = new ScreenManager; StepMania::ResetGame(); diff --git a/src/Steps.cpp b/src/Steps.cpp index 5acd4d209d..40c9258665 100644 --- a/src/Steps.cpp +++ b/src/Steps.cpp @@ -43,7 +43,7 @@ XToString( DisplayBPM ); LuaXType( DisplayBPM ); Steps::Steps(Song *song): m_StepsType(StepsType_Invalid), m_pSong(song), - parent(NULL), m_pNoteData(smnew NoteData), m_bNoteDataIsFilled(false), + parent(NULL), m_pNoteData(new NoteData), m_bNoteDataIsFilled(false), m_sNoteDataCompressed(""), m_sFilename(""), m_bSavedToDisk(false), m_LoadedFromProfile(ProfileSlot_Invalid), m_iHash(0), m_sDescription(""), m_sChartStyle(""), diff --git a/src/StepsUtil.cpp b/src/StepsUtil.cpp index d6c902cd6c..b1bdf75d50 100644 --- a/src/StepsUtil.cpp +++ b/src/StepsUtil.cpp @@ -275,7 +275,7 @@ Steps *StepsID::ToSteps( const Song *p, bool bAllowNull ) const XNode* StepsID::CreateNode() const { - XNode* pNode = smnew XNode( "Steps" ); + XNode* pNode = new XNode( "Steps" ); pNode->AppendAttr( "StepsType", GAMEMAN->GetStepsTypeInfo(st).szName ); pNode->AppendAttr( "Difficulty", DifficultyToString(dc) ); diff --git a/src/StreamDisplay.cpp b/src/StreamDisplay.cpp index 1dc1ee6f8a..d6ddba882e 100644 --- a/src/StreamDisplay.cpp +++ b/src/StreamDisplay.cpp @@ -47,7 +47,7 @@ void StreamDisplay::Load( const RString & /* unreferenced: _sMetricsGroup */) for( int i=0; iLoad( THEME->GetPathG( sMetricsGroup, StreamTypeToString(st) ) ); m_vpSprPill[st].push_back( pSpr ); diff --git a/src/StyleUtil.cpp b/src/StyleUtil.cpp index d3a70b4078..114803e8d2 100644 --- a/src/StyleUtil.cpp +++ b/src/StyleUtil.cpp @@ -31,7 +31,7 @@ const Style *StyleID::ToStyle() const XNode* StyleID::CreateNode() const { - XNode* pNode = smnew XNode( "Style" ); + XNode* pNode = new XNode( "Style" ); pNode->AppendAttr( "Game", sGame ); pNode->AppendAttr( "Style", sStyle ); diff --git a/src/ThemeManager.cpp b/src/ThemeManager.cpp index f0485fad12..8842bf5175 100644 --- a/src/ThemeManager.cpp +++ b/src/ThemeManager.cpp @@ -73,7 +73,7 @@ SubscriptionManager & GetSubscribers() class LocalizedStringImplThemeMetric : public ILocalizedStringImpl, public ThemeMetric { public: - static ILocalizedStringImpl *Create() { return smnew LocalizedStringImplThemeMetric; } + static ILocalizedStringImpl *Create() { return new LocalizedStringImplThemeMetric; } void Load( const RString& sGroup, const RString& sName ) { @@ -280,7 +280,7 @@ bool ThemeManager::DoesLanguageExist( const RString &sLanguage ) void ThemeManager::LoadThemeMetrics( const RString &sThemeName_, const RString &sLanguage_ ) { if( g_pLoadedThemeData == NULL ) - g_pLoadedThemeData = smnew LoadedThemeData; + g_pLoadedThemeData = new LoadedThemeData; // Don't delete and recreate LoadedThemeData. There are references iniMetrics and iniStrings // on the stack, so Clear them instead. @@ -1051,7 +1051,7 @@ void ThemeManager::GetMetric( const RString &sMetricsGroup, const RString &sValu #if !defined(SMPACKAGE) apActorCommands ThemeManager::GetMetricA( const RString &sMetricsGroup, const RString &sValueName ) { - LuaReference *pRef = smnew LuaReference; + LuaReference *pRef = new LuaReference; GetMetric( sMetricsGroup, sValueName, *pRef ); return apActorCommands( pRef ); } diff --git a/src/TimingData.cpp b/src/TimingData.cpp index 8e30d3531b..1393b9132b 100644 --- a/src/TimingData.cpp +++ b/src/TimingData.cpp @@ -188,7 +188,7 @@ void TimingData::MultiplyBPMInBeatRange( int iStartIndex, int iEndIndex, float f * split it into two. */ if( iStartIndexThisSegment < iStartIndex && iStartIndexNextSegment > iStartIndex ) { - BPMSegment * b = smnew BPMSegment(iStartIndexNextSegment, + BPMSegment * b = new BPMSegment(iStartIndexNextSegment, bs->GetBPS()); bpms.insert(bpms.begin()+i+1, b); @@ -200,7 +200,7 @@ void TimingData::MultiplyBPMInBeatRange( int iStartIndex, int iEndIndex, float f // If this BPM segment crosses the end of the range, split it into two. if( iStartIndexThisSegment < iEndIndex && iStartIndexNextSegment > iEndIndex ) { - BPMSegment * b = smnew BPMSegment(iEndIndex, + BPMSegment * b = new BPMSegment(iEndIndex, bs->GetBPS()); bpms.insert(bpms.begin()+i+1, b); } diff --git a/src/TimingSegments.h b/src/TimingSegments.h index 04e1d794ec..ef2c5e5e26 100644 --- a/src/TimingSegments.h +++ b/src/TimingSegments.h @@ -121,7 +121,7 @@ struct FakeSegment : public TimingSegment TimingSegmentType GetType() const { return SEGMENT_FAKE; } SegmentEffectType GetEffectType() const { return SegmentEffectType_Range; } - TimingSegment* Copy() const { return smnew FakeSegment(*this); } + TimingSegment* Copy() const { return new FakeSegment(*this); } bool IsNotable() const { return m_iLengthRows > 0; } void DebugPrint() const; @@ -179,7 +179,7 @@ struct WarpSegment : public TimingSegment { TimingSegmentType GetType() const { return SEGMENT_WARP; } SegmentEffectType GetEffectType() const { return SegmentEffectType_Range; } - TimingSegment* Copy() const { return smnew WarpSegment(*this); } + TimingSegment* Copy() const { return new WarpSegment(*this); } bool IsNotable() const { return m_iLengthRows > 0; } void DebugPrint() const; @@ -246,7 +246,7 @@ struct TickcountSegment : public TimingSegment bool IsNotable() const { return true; } // indefinite segments are always true void DebugPrint() const; - TimingSegment* Copy() const { return smnew TickcountSegment(*this); } + TimingSegment* Copy() const { return new TickcountSegment(*this); } TickcountSegment( int iStartRow = ROW_INVALID, int iTicks = DEFAULT_TICK_COUNT ) : TimingSegment(iStartRow), m_iTicksPerBeat(iTicks) { } @@ -292,7 +292,7 @@ struct ComboSegment : public TimingSegment bool IsNotable() const { return true; } // indefinite segments are always true void DebugPrint() const; - TimingSegment* Copy() const { return smnew ComboSegment(*this); } + TimingSegment* Copy() const { return new ComboSegment(*this); } ComboSegment( int iStartRow = ROW_INVALID, int iCombo = 1, int iMissCombo = 1 ) : TimingSegment(iStartRow), m_iCombo(iCombo), @@ -348,7 +348,7 @@ struct LabelSegment : public TimingSegment bool IsNotable() const { return true; } // indefinite segments are always true void DebugPrint() const; - TimingSegment* Copy() const { return smnew LabelSegment(*this); } + TimingSegment* Copy() const { return new LabelSegment(*this); } LabelSegment( int iStartRow = ROW_INVALID, const RString& sLabel = RString() ) : TimingSegment(iStartRow), m_sLabel(sLabel) { } @@ -391,7 +391,7 @@ struct BPMSegment : public TimingSegment bool IsNotable() const { return true; } // indefinite segments are always true void DebugPrint() const; - TimingSegment* Copy() const { return smnew BPMSegment(*this); } + TimingSegment* Copy() const { return new BPMSegment(*this); } // note that this takes a BPM, not a BPS (compatibility) BPMSegment( int iStartRow = ROW_INVALID, float fBPM = 0.0f ) : @@ -443,7 +443,7 @@ struct TimeSignatureSegment : public TimingSegment bool IsNotable() const { return true; } // indefinite segments are always true void DebugPrint() const; - TimingSegment* Copy() const { return smnew TimeSignatureSegment(*this); } + TimingSegment* Copy() const { return new TimeSignatureSegment(*this); } TimeSignatureSegment( int iStartRow = ROW_INVALID, int iNum = 4, int iDenom = 4 ) : @@ -517,7 +517,7 @@ struct SpeedSegment : public TimingSegment bool IsNotable() const { return true; } // indefinite segments are always true void DebugPrint() const; - TimingSegment* Copy() const { return smnew SpeedSegment(*this); } + TimingSegment* Copy() const { return new SpeedSegment(*this); } /** @brief The type of unit used for segment scaling. */ enum BaseUnit { UNIT_BEATS, UNIT_SECONDS }; @@ -591,7 +591,7 @@ struct ScrollSegment : public TimingSegment bool IsNotable() const { return true; } // indefinite segments are always true void DebugPrint() const; - TimingSegment* Copy() const { return smnew ScrollSegment(*this); } + TimingSegment* Copy() const { return new ScrollSegment(*this); } ScrollSegment( int iStartRow = ROW_INVALID, float fRatio = 1.0f ) : TimingSegment(iStartRow), m_fRatio(fRatio) { } @@ -635,7 +635,7 @@ struct StopSegment : public TimingSegment bool IsNotable() const { return m_fSeconds > 0; } void DebugPrint() const; - TimingSegment* Copy() const { return smnew StopSegment(*this); } + TimingSegment* Copy() const { return new StopSegment(*this); } StopSegment( int iStartRow = ROW_INVALID, float fSeconds = 0.0f ) : TimingSegment(iStartRow), m_fSeconds(fSeconds) { } @@ -678,7 +678,7 @@ struct DelaySegment : public TimingSegment bool IsNotable() const { return m_fSeconds > 0; } void DebugPrint() const; - TimingSegment* Copy() const { return smnew DelaySegment(*this); } + TimingSegment* Copy() const { return new DelaySegment(*this); } DelaySegment( int iStartRow = ROW_INVALID, float fSeconds = 0 ) : TimingSegment(iStartRow), m_fSeconds(fSeconds) { } diff --git a/src/TitleSubstitution.cpp b/src/TitleSubstitution.cpp index a246413275..5f3f698770 100644 --- a/src/TitleSubstitution.cpp +++ b/src/TitleSubstitution.cpp @@ -69,7 +69,7 @@ void TitleTrans::LoadFromNode( const XNode* pNode ) void TitleSubst::AddTrans(const TitleTrans &tr) { ASSERT( tr.TitleFrom.IsSet() || tr.SubFrom.IsSet() || tr.ArtistFrom.IsSet() ); - ttab.push_back(smnew TitleTrans(tr)); + ttab.push_back(new TitleTrans(tr)); } void TitleSubst::Subst( TitleFields &tf ) diff --git a/src/TrailUtil.cpp b/src/TrailUtil.cpp index 6716dda8c4..0ea7864a3e 100644 --- a/src/TrailUtil.cpp +++ b/src/TrailUtil.cpp @@ -57,7 +57,7 @@ Trail *TrailID::ToTrail( const Course *p, bool bAllowNull ) const XNode* TrailID::CreateNode() const { - XNode* pNode = smnew XNode( "Trail" ); + XNode* pNode = new XNode( "Trail" ); pNode->AppendAttr( "StepsType", GAMEMAN->GetStepsTypeInfo(st).szName ); pNode->AppendAttr( "CourseDifficulty", DifficultyToString(cd) ); diff --git a/src/Tween.cpp b/src/Tween.cpp index d4b17151a2..69021d0e14 100644 --- a/src/Tween.cpp +++ b/src/Tween.cpp @@ -19,22 +19,22 @@ LuaXType( TweenType ); struct TweenLinear: public ITween { float Tween( float f ) const { return f; } - ITween *Copy() const { return smnew TweenLinear(*this); } + ITween *Copy() const { return new TweenLinear(*this); } }; struct TweenAccelerate: public ITween { float Tween( float f ) const { return f*f; } - ITween *Copy() const { return smnew TweenAccelerate(*this); } + ITween *Copy() const { return new TweenAccelerate(*this); } }; struct TweenDecelerate: public ITween { float Tween( float f ) const { return 1 - (1-f) * (1-f); } - ITween *Copy() const { return smnew TweenDecelerate(*this); } + ITween *Copy() const { return new TweenDecelerate(*this); } }; struct TweenSpring: public ITween { float Tween( float f ) const { return 1 - RageFastCos( f*PI*2.5f )/(1+f*3); } - ITween *Copy() const { return smnew TweenSpring(*this); } + ITween *Copy() const { return new TweenSpring(*this); } }; @@ -44,7 +44,7 @@ struct TweenSpring: public ITween struct InterpolateBezier1D: public ITween { float Tween( float f ) const; - ITween *Copy() const { return smnew InterpolateBezier1D(*this); } + ITween *Copy() const { return new InterpolateBezier1D(*this); } RageQuadratic m_Bezier; }; @@ -60,7 +60,7 @@ float InterpolateBezier1D::Tween( float f ) const struct InterpolateBezier2D: public ITween { float Tween( float f ) const; - ITween *Copy() const { return smnew InterpolateBezier2D(*this); } + ITween *Copy() const { return new InterpolateBezier2D(*this); } RageBezier2D m_Bezier; }; @@ -80,10 +80,10 @@ ITween *ITween::CreateFromType( TweenType tt ) { switch( tt ) { - case TWEEN_LINEAR: return smnew TweenLinear; - case TWEEN_ACCELERATE: return smnew TweenAccelerate; - case TWEEN_DECELERATE: return smnew TweenDecelerate; - case TWEEN_SPRING: return smnew TweenSpring; + case TWEEN_LINEAR: return new TweenLinear; + case TWEEN_ACCELERATE: return new TweenAccelerate; + case TWEEN_DECELERATE: return new TweenDecelerate; + case TWEEN_SPRING: return new TweenSpring; default: FAIL_M(ssprintf("Invalid TweenType: %i", tt)); } @@ -109,13 +109,13 @@ ITween *ITween::CreateFromStack( Lua *L, int iStackPos ) lua_pop( L, iArgs ); if( iArgs == 4 ) { - InterpolateBezier1D *pBezier = smnew InterpolateBezier1D; + InterpolateBezier1D *pBezier = new InterpolateBezier1D; pBezier->m_Bezier.SetFromBezier( fC[0], fC[1], fC[2], fC[3] ); return pBezier; } else if( iArgs == 8 ) { - InterpolateBezier2D *pBezier = smnew InterpolateBezier2D; + InterpolateBezier2D *pBezier = new InterpolateBezier2D; pBezier->m_Bezier.SetFromBezier( fC[0], fC[1], fC[2], fC[3], fC[4], fC[5], fC[6], fC[7] ); return pBezier; } diff --git a/src/WheelItemBase.h b/src/WheelItemBase.h index 78f1b3b183..0dc1146636 100644 --- a/src/WheelItemBase.h +++ b/src/WheelItemBase.h @@ -41,7 +41,7 @@ public: WheelItemBase( RString sType ); WheelItemBase( const WheelItemBase &cpy ); virtual void DrawPrimitives(); - virtual WheelItemBase *Copy() const { return smnew WheelItemBase(*this); } + virtual WheelItemBase *Copy() const { return new WheelItemBase(*this); } void Load( RString sType ); void DrawGrayBar( Actor& bar ); diff --git a/src/WorkoutGraph.cpp b/src/WorkoutGraph.cpp index be677c8f02..601c2925e4 100644 --- a/src/WorkoutGraph.cpp +++ b/src/WorkoutGraph.cpp @@ -88,7 +88,7 @@ void WorkoutGraph::SetInternal( int iMinSongsPlayed ) { int iIndex = iter - viMeters.begin(); float fOffsetFromCenter = iIndex - (iBlocksWide-1)/2.0f; - Sprite *p = smnew Sprite; + Sprite *p = new Sprite; p->Load( THEME->GetPathG("WorkoutGraph","bar") ); p->SetVertAlign( align_bottom ); p->ZoomToWidth( fBlockSize ); diff --git a/src/XmlFile.cpp b/src/XmlFile.cpp index 7be74828fe..1cb67627d8 100644 --- a/src/XmlFile.cpp +++ b/src/XmlFile.cpp @@ -31,7 +31,7 @@ XNode::XNode( const XNode &cpy ): FOREACH_CONST_Attr( &cpy, pAttr ) this->AppendAttrFrom( pAttr->first, pAttr->second->Copy() ); FOREACH_CONST_Child( &cpy, c ) - this->AppendChild( smnew XNode(*c) ); + this->AppendChild( new XNode(*c) ); } void XNode::Clear() @@ -190,7 +190,7 @@ XNodeValue *XNode::AppendAttr( const RString &sName ) DEBUG_ASSERT( sName.size() ); pair ret = m_attrs.insert( make_pair(sName, (XNodeValue *) NULL) ); if( ret.second ) - ret.first->second = smnew XNodeStringValue; + ret.first->second = new XNodeStringValue; return ret.first->second; // already existed } diff --git a/src/XmlFile.h b/src/XmlFile.h index 098610031b..725b27d26e 100644 --- a/src/XmlFile.h +++ b/src/XmlFile.h @@ -36,7 +36,7 @@ class XNodeStringValue: public XNodeValue public: RString m_sValue; - XNodeValue *Copy() const { return smnew XNodeStringValue( *this ); } + XNodeValue *Copy() const { return new XNodeStringValue( *this ); } void GetValue( RString &out ) const; void GetValue( int &out ) const; @@ -111,7 +111,7 @@ public: // modify DOM template XNode *AppendChild( const RString &sName, T value ) { XNode *p=AppendChild(sName); p->AppendAttr(XNode::TEXT_ATTRIBUTE, value); return p; } - XNode *AppendChild( const RString &sName ) { XNode *p=smnew XNode(sName); return AppendChild(p); } + XNode *AppendChild( const RString &sName ) { XNode *p=new XNode(sName); return AppendChild(p); } XNode *AppendChild( XNode *node ); bool RemoveChild( XNode *node, bool bDelete = true ); diff --git a/src/XmlFileUtil.cpp b/src/XmlFileUtil.cpp index 4fad7b59b9..0704bfe350 100644 --- a/src/XmlFileUtil.cpp +++ b/src/XmlFileUtil.cpp @@ -311,7 +311,7 @@ RString::size_type LoadInternal( XNode *pNode, const RString &xml, RString &sErr // generate child nodes while( iOffset < xml.size() ) { - XNode *node = smnew XNode; + XNode *node = new XNode; iOffset = LoadInternal( node, xml, sErrorOut, iOffset ); if( iOffset == string::npos ) @@ -531,7 +531,7 @@ class XNodeLuaValue: public XNodeValue { public: LuaReference m_Value; - XNodeValue *Copy() const { return smnew XNodeLuaValue( *this ); } + XNodeValue *Copy() const { return new XNodeLuaValue( *this ); } template T GetValue() const { T val; GetValue(val); return val; } @@ -593,7 +593,7 @@ namespace LuaHelpers::RunExpression( L, sExpression, sFile ); } - XNodeLuaValue *pRet = smnew XNodeLuaValue; + XNodeLuaValue *pRet = new XNodeLuaValue; pRet->SetValueFromStack( L ); return pRet; } @@ -627,11 +627,11 @@ namespace { XNode *XNodeFromTableRecursive( lua_State *L, const RString &sName, LuaReference &ProcessedTables ) { - XNode *pNode = smnew XNode( sName ); + XNode *pNode = new XNode( sName ); // Set the value of the node to the table. { - XNodeLuaValue *pValue = smnew XNodeLuaValue; + XNodeLuaValue *pValue = new XNodeLuaValue; lua_pushvalue( L, -1 ); pValue->SetValueFromStack( L ); pNode->AppendAttrFrom( XNode::TEXT_ATTRIBUTE, pValue ); @@ -681,7 +681,7 @@ namespace LuaHelpers::Pop( L, nName ); // Otherwise, add an attribute. - XNodeLuaValue *pValue = smnew XNodeLuaValue; + XNodeLuaValue *pValue = new XNodeLuaValue; pValue->SetValueFromStack( L ); pNode->AppendAttrFrom( nName, pValue ); } diff --git a/src/arch/Dialog/Dialog.cpp b/src/arch/Dialog/Dialog.cpp index a3df0eb396..62ec752fc6 100644 --- a/src/arch/Dialog/Dialog.cpp +++ b/src/arch/Dialog/Dialog.cpp @@ -30,13 +30,13 @@ DialogDriver *MakeDialogDriver() sDriver = asDriversToTry[i]; #ifdef USE_DIALOG_DRIVER_COCOA - if( !asDriversToTry[i].CompareNoCase("Cocoa") ) pRet = smnew DialogDriver_MacOSX; + if( !asDriversToTry[i].CompareNoCase("Cocoa") ) pRet = new DialogDriver_MacOSX; #endif #ifdef USE_DIALOG_DRIVER_WIN32 - if( !asDriversToTry[i].CompareNoCase("Win32") ) pRet = smnew DialogDriver_Win32; + if( !asDriversToTry[i].CompareNoCase("Win32") ) pRet = new DialogDriver_Win32; #endif #ifdef USE_DIALOG_DRIVER_NULL - if( !asDriversToTry[i].CompareNoCase("Null") ) pRet = smnew DialogDriver_Null; + if( !asDriversToTry[i].CompareNoCase("Null") ) pRet = new DialogDriver_Null; #endif if( pRet == NULL ) diff --git a/src/arch/InputHandler/InputHandler.cpp b/src/arch/InputHandler/InputHandler.cpp index 06de1e9f6d..20bb126fdf 100644 --- a/src/arch/InputHandler/InputHandler.cpp +++ b/src/arch/InputHandler/InputHandler.cpp @@ -189,7 +189,7 @@ void InputHandler::Create( const RString &drivers_, vector &Add } // Always add - Add.push_back( smnew InputHandler_MonkeyKeyboard ); + Add.push_back( new InputHandler_MonkeyKeyboard ); } diff --git a/src/arch/InputHandler/InputHandler_Win32_Para.cpp b/src/arch/InputHandler/InputHandler_Win32_Para.cpp index b038ed9721..fbf7af2b5f 100644 --- a/src/arch/InputHandler/InputHandler_Win32_Para.cpp +++ b/src/arch/InputHandler/InputHandler_Win32_Para.cpp @@ -30,7 +30,7 @@ InputHandler_Win32_Para::InputHandler_Win32_Para() const int para_usb_vid = 0x0507; const int para_usb_pid = 0x0011; - USBDevice *dev = smnew USBDevice; + USBDevice *dev = new USBDevice; if( dev->Open(para_usb_vid, para_usb_pid, sizeof(long), 0, InitHack) ) { diff --git a/src/arch/InputHandler/InputHandler_Win32_Pump.cpp b/src/arch/InputHandler/InputHandler_Win32_Pump.cpp index e969e854a6..57fa2379ea 100644 --- a/src/arch/InputHandler/InputHandler_Win32_Pump.cpp +++ b/src/arch/InputHandler/InputHandler_Win32_Pump.cpp @@ -19,7 +19,7 @@ InputHandler_Win32_Pump::InputHandler_Win32_Pump() 0x0003 /* shipped with Exceed */ }; - m_pDevice = smnew USBDevice[NUM_PUMPS]; + m_pDevice = new USBDevice[NUM_PUMPS]; int iNumFound = 0; for( int p = 0; p < ARRAYSIZE(pump_usb_pids); ++p ) diff --git a/src/arch/LoadingWindow/LoadingWindow.cpp b/src/arch/LoadingWindow/LoadingWindow.cpp index a9e3f43ad9..1c75ec774d 100644 --- a/src/arch/LoadingWindow/LoadingWindow.cpp +++ b/src/arch/LoadingWindow/LoadingWindow.cpp @@ -7,9 +7,9 @@ LoadingWindow *LoadingWindow::Create() { if( !PREFSMAN->m_bShowLoadingWindow ) - return smnew LoadingWindow_Null; + return new LoadingWindow_Null; #if defined(UNIX) && !defined(HAVE_GTK) - return smnew LoadingWindow_Null; + return new LoadingWindow_Null; #endif // Don't load NULL by default. const RString drivers = "win32,macosx,gtk"; @@ -26,15 +26,15 @@ LoadingWindow *LoadingWindow::Create() Driver = DriversToTry[i]; #ifdef USE_LOADING_WINDOW_MACOSX - if( !DriversToTry[i].CompareNoCase("MacOSX") ) ret = smnew LoadingWindow_MacOSX; + if( !DriversToTry[i].CompareNoCase("MacOSX") ) ret = new LoadingWindow_MacOSX; #endif #ifdef USE_LOADING_WINDOW_GTK - if( !DriversToTry[i].CompareNoCase("Gtk") ) ret = smnew LoadingWindow_Gtk; + if( !DriversToTry[i].CompareNoCase("Gtk") ) ret = new LoadingWindow_Gtk; #endif #ifdef USE_LOADING_WINDOW_WIN32 - if( !DriversToTry[i].CompareNoCase("Win32") ) ret = smnew LoadingWindow_Win32; + if( !DriversToTry[i].CompareNoCase("Win32") ) ret = new LoadingWindow_Win32; #endif - if( !DriversToTry[i].CompareNoCase("Null") ) ret = smnew LoadingWindow_Null; + if( !DriversToTry[i].CompareNoCase("Null") ) ret = new LoadingWindow_Null; if( ret == NULL ) continue; diff --git a/src/arch/LowLevelWindow/LowLevelWindow.cpp b/src/arch/LowLevelWindow/LowLevelWindow.cpp index 60cf743eef..338946a66d 100644 --- a/src/arch/LowLevelWindow/LowLevelWindow.cpp +++ b/src/arch/LowLevelWindow/LowLevelWindow.cpp @@ -4,7 +4,7 @@ LowLevelWindow *LowLevelWindow::Create() { - return smnew ARCH_LOW_LEVEL_WINDOW; + return new ARCH_LOW_LEVEL_WINDOW; } /* diff --git a/src/arch/LowLevelWindow/LowLevelWindow_Win32.cpp b/src/arch/LowLevelWindow/LowLevelWindow_Win32.cpp index dbcc4d279a..5121291bd8 100644 --- a/src/arch/LowLevelWindow/LowLevelWindow_Win32.cpp +++ b/src/arch/LowLevelWindow/LowLevelWindow_Win32.cpp @@ -403,7 +403,7 @@ void RenderTarget_Win32::FinishRenderingTo() RenderTarget* LowLevelWindow_Win32::CreateRenderTarget() { - return smnew RenderTarget_Win32( this ); + return new RenderTarget_Win32( this ); } /* diff --git a/src/arch/MemoryCard/MemoryCardDriver.cpp b/src/arch/MemoryCard/MemoryCardDriver.cpp index 7cb9bcda9c..7600370f72 100644 --- a/src/arch/MemoryCard/MemoryCardDriver.cpp +++ b/src/arch/MemoryCard/MemoryCardDriver.cpp @@ -127,11 +127,11 @@ MemoryCardDriver *MemoryCardDriver::Create() MemoryCardDriver *ret = NULL; #ifdef ARCH_MEMORY_CARD_DRIVER - ret = smnew ARCH_MEMORY_CARD_DRIVER; + ret = new ARCH_MEMORY_CARD_DRIVER; #endif if( !ret ) - ret = smnew MemoryCardDriver_Null; + ret = new MemoryCardDriver_Null; return ret; } diff --git a/src/arch/MovieTexture/MovieTexture_DShow.cpp b/src/arch/MovieTexture/MovieTexture_DShow.cpp index e2f7d935ce..cac1360c7d 100644 --- a/src/arch/MovieTexture/MovieTexture_DShow.cpp +++ b/src/arch/MovieTexture/MovieTexture_DShow.cpp @@ -31,7 +31,7 @@ RageMovieTexture *RageMovieTextureDriver_DShow::Create( RageTextureID ID, RString &sError ) { - MovieTexture_DShow *pRet = smnew MovieTexture_DShow( ID ); + MovieTexture_DShow *pRet = new MovieTexture_DShow( ID ); sError = pRet->Init(); if( !sError.empty() ) SAFE_DELETE( pRet ); @@ -349,7 +349,7 @@ RString MovieTexture_DShow::Create() RageException::Throw( hr_ssprintf(hr, "Could not create CLSID_FilterGraph!") ); // Create the Texture Renderer object - CTextureRenderer *pCTR = smnew CTextureRenderer; + CTextureRenderer *pCTR = new CTextureRenderer; /* Get a pointer to the IBaseFilter on the TextureRenderer, and add it to the * graph. When m_pGB is released, it will free pFTR. */ diff --git a/src/arch/MovieTexture/MovieTexture_FFMpeg.cpp b/src/arch/MovieTexture/MovieTexture_FFMpeg.cpp index aef38d543f..8392dae51f 100644 --- a/src/arch/MovieTexture/MovieTexture_FFMpeg.cpp +++ b/src/arch/MovieTexture/MovieTexture_FFMpeg.cpp @@ -570,7 +570,7 @@ static RString averr_ssprintf( int err, const char *fmt, ... ) va_end(va); size_t errbuf_size = 512; - char* errbuf = smnew char[errbuf_size]; + char* errbuf = new char[errbuf_size]; avcodec::av_strerror(err, errbuf, errbuf_size); RString Error = ssprintf("%i: %s", err, errbuf); delete errbuf; @@ -620,7 +620,7 @@ RString MovieDecoder_FFMpeg::Open( RString sFile ) if( !m_fctx ) return "AVCodec: Couldn't allocate context"; - RageFile *f = smnew RageFile; + RageFile *f = new RageFile; if( !f->Open(sFile, RageFile::READ) ) { @@ -719,13 +719,13 @@ RageSurface *MovieDecoder_FFMpeg::CreateCompatibleSurface( int iTextureWidth, in } MovieTexture_FFMpeg::MovieTexture_FFMpeg( RageTextureID ID ): - MovieTexture_Generic( ID, smnew MovieDecoder_FFMpeg ) + MovieTexture_Generic( ID, new MovieDecoder_FFMpeg ) { } RageMovieTexture *RageMovieTextureDriver_FFMpeg::Create( RageTextureID ID, RString &sError ) { - MovieTexture_FFMpeg *pRet = smnew MovieTexture_FFMpeg( ID ); + MovieTexture_FFMpeg *pRet = new MovieTexture_FFMpeg( ID ); sError = pRet->Init(); if( !sError.empty() ) SAFE_DELETE( pRet ); diff --git a/src/arch/MovieTexture/MovieTexture_Generic.cpp b/src/arch/MovieTexture/MovieTexture_Generic.cpp index 8b808bc1fc..05909a0740 100644 --- a/src/arch/MovieTexture/MovieTexture_Generic.cpp +++ b/src/arch/MovieTexture/MovieTexture_Generic.cpp @@ -35,7 +35,7 @@ MovieTexture_Generic::MovieTexture_Generic( RageTextureID ID, MovieDecoder *pDec m_bWantRewind = false; m_fClock = 0; m_bFrameSkipMode = false; - m_pSprite = smnew Sprite; + m_pSprite = new Sprite; } RString MovieTexture_Generic::Init() @@ -270,13 +270,13 @@ void MovieTexture_Generic::CreateTexture() RageTextureID TargetID( GetID() ); TargetID.filename += " target"; - m_pRenderTarget = smnew RageTextureRenderTarget( TargetID, param ); + m_pRenderTarget = new RageTextureRenderTarget( TargetID, param ); /* Create the intermediate texture. This receives the YUV image. */ RageTextureID IntermedID( GetID() ); IntermedID.filename += " intermediate"; - m_pTextureIntermediate = smnew RageMovieTexture_Generic_Intermediate( IntermedID, + m_pTextureIntermediate = new RageMovieTexture_Generic_Intermediate( IntermedID, m_pDecoder->GetWidth(), m_pDecoder->GetHeight(), m_pSurface->w, m_pSurface->h, power_of_two(m_pSurface->w), power_of_two(m_pSurface->h), diff --git a/src/arch/MovieTexture/MovieTexture_Null.cpp b/src/arch/MovieTexture/MovieTexture_Null.cpp index 13a0930bf8..6777aa88cf 100644 --- a/src/arch/MovieTexture/MovieTexture_Null.cpp +++ b/src/arch/MovieTexture/MovieTexture_Null.cpp @@ -68,7 +68,7 @@ REGISTER_MOVIE_TEXTURE_CLASS( Null ); RageMovieTexture *RageMovieTextureDriver_Null::Create( RageTextureID ID, RString &sError ) { - return smnew MovieTexture_Null( ID ); + return new MovieTexture_Null( ID ); } /* diff --git a/src/arch/Sound/DSoundHelpers.cpp b/src/arch/Sound/DSoundHelpers.cpp index 4b5dad4e54..111816d534 100644 --- a/src/arch/Sound/DSoundHelpers.cpp +++ b/src/arch/Sound/DSoundHelpers.cpp @@ -257,7 +257,7 @@ RString DSoundBuf::Init( DSound &ds, DSoundBuf::hw hardware, else if( (int) waveformat.nSamplesPerSec != m_iSampleRate ) LOG->Warn( "Secondary buffer set to %i instead of %i", waveformat.nSamplesPerSec, m_iSampleRate ); - m_pTempBuffer = smnew char[m_iBufferSize]; + m_pTempBuffer = new char[m_iBufferSize]; return RString(); } diff --git a/src/arch/Sound/RageSoundDriver_DSound_Software.cpp b/src/arch/Sound/RageSoundDriver_DSound_Software.cpp index 492cedacab..1366f45fec 100644 --- a/src/arch/Sound/RageSoundDriver_DSound_Software.cpp +++ b/src/arch/Sound/RageSoundDriver_DSound_Software.cpp @@ -93,7 +93,7 @@ RString RageSoundDriver_DSound_Software::Init() g_iMaxWriteahead = PREFSMAN->m_iSoundWriteAhead; /* Create a DirectSound stream, but don't force it into hardware. */ - m_pPCM = smnew DSoundBuf; + m_pPCM = new DSoundBuf; m_iSampleRate = PREFSMAN->m_iSoundPreferredSampleRate; if( m_iSampleRate == 0 ) m_iSampleRate = 44100; diff --git a/src/arch/Sound/RageSoundDriver_WDMKS.cpp b/src/arch/Sound/RageSoundDriver_WDMKS.cpp index cfb3f66c65..5e477a09b6 100644 --- a/src/arch/Sound/RageSoundDriver_WDMKS.cpp +++ b/src/arch/Sound/RageSoundDriver_WDMKS.cpp @@ -370,7 +370,7 @@ WinWdmPin *WinWdmFilter::CreatePin( unsigned long iPinId, RString &sError ) } /* Allocate the new PIN object */ - WinWdmPin *pPin = smnew WinWdmPin( this, iPinId ); + WinWdmPin *pPin = new WinWdmPin( this, iPinId ); /* Get DATARANGEs */ KSMULTIPLE_ITEM *pDataRangesItem; @@ -537,7 +537,7 @@ bool WinWdmPin::IsFormatSupported( const WAVEFORMATEX *pFormat ) const WinWdmFilter *WinWdmFilter::Create( const RString &sFilterName, const RString &sFriendlyName, RString &sError ) { /* Allocate the new filter object */ - WinWdmFilter *pFilter = smnew WinWdmFilter; + WinWdmFilter *pFilter = new WinWdmFilter; pFilter->m_sFilterName = sFilterName; pFilter->m_sFriendlyName = sFriendlyName; @@ -1321,7 +1321,7 @@ RString RageSoundDriver_WDMKS::Init() } apFilters.clear(); - m_pStream = smnew WinWdmStream; + m_pStream = new WinWdmStream; if( !m_pStream->Open( m_pFilter, PREFSMAN->m_iSoundWriteAhead, DeviceSampleFormat_Int16, diff --git a/src/arch/Sound/RageSoundDriver_WaveOut.cpp b/src/arch/Sound/RageSoundDriver_WaveOut.cpp index d9c4cb1b07..91ad896fd5 100644 --- a/src/arch/Sound/RageSoundDriver_WaveOut.cpp +++ b/src/arch/Sound/RageSoundDriver_WaveOut.cpp @@ -132,7 +132,7 @@ RString RageSoundDriver_WaveOut::Init() for(int b = 0; b < num_chunks; ++b) { m_aBuffers[b].dwBufferLength = chunksize; - m_aBuffers[b].lpData = smnew char[chunksize]; + m_aBuffers[b].lpData = new char[chunksize]; ret = waveOutPrepareHeader( m_hWaveOut, &m_aBuffers[b], sizeof(m_aBuffers[b]) ); if( ret != MMSYSERR_NOERROR ) return wo_ssprintf( ret, "waveOutPrepareHeader failed" ); diff --git a/src/arch/Threads/Threads_Win32.cpp b/src/arch/Threads/Threads_Win32.cpp index 20ba4c2197..7cde15f42a 100644 --- a/src/arch/Threads/Threads_Win32.cpp +++ b/src/arch/Threads/Threads_Win32.cpp @@ -125,7 +125,7 @@ static int GetOpenSlot( uint64_t iID ) ThreadImpl *MakeThisThread() { - ThreadImpl_Win32 *thread = smnew ThreadImpl_Win32; + ThreadImpl_Win32 *thread = new ThreadImpl_Win32; SetThreadName( GetCurrentThreadId(), RageThread::GetCurrentThreadName() ); @@ -151,7 +151,7 @@ ThreadImpl *MakeThisThread() ThreadImpl *MakeThread( int (*pFunc)(void *pData), void *pData, uint64_t *piThreadID ) { - ThreadImpl_Win32 *thread = smnew ThreadImpl_Win32; + ThreadImpl_Win32 *thread = new ThreadImpl_Win32; thread->m_pFunc = pFunc; thread->m_pData = pData; @@ -254,7 +254,7 @@ uint64_t GetInvalidThreadId() MutexImpl *MakeMutex( RageMutex *pParent ) { - return smnew MutexImpl_Win32( pParent ); + return new MutexImpl_Win32( pParent ); } EventImpl_Win32::EventImpl_Win32( MutexImpl_Win32 *pParent ) @@ -425,7 +425,7 @@ EventImpl *MakeEvent( MutexImpl *pMutex ) { MutexImpl_Win32 *pWin32Mutex = (MutexImpl_Win32 *) pMutex; - return smnew EventImpl_Win32( pWin32Mutex ); + return new EventImpl_Win32( pWin32Mutex ); } SemaImpl_Win32::SemaImpl_Win32( int iInitialValue ) @@ -480,7 +480,7 @@ bool SemaImpl_Win32::TryWait() SemaImpl *MakeSemaphore( int iInitialValue ) { - return smnew SemaImpl_Win32( iInitialValue ); + return new SemaImpl_Win32( iInitialValue ); } /* diff --git a/src/archutils/Win32/CrashHandlerChild.cpp b/src/archutils/Win32/CrashHandlerChild.cpp index 1d998df873..7e377017df 100644 --- a/src/archutils/Win32/CrashHandlerChild.cpp +++ b/src/archutils/Win32/CrashHandlerChild.cpp @@ -736,7 +736,7 @@ BOOL CrashDialog::HandleMessage( UINT msg, WPARAM wParam, LPARAM lParam ) SendDlgItemMessage( hDlg, IDC_PROGRESS, PBM_SETPOS, 0, 0 ); // Create the form data to send. - m_pPost = smnew NetworkPostData; + m_pPost = new NetworkPostData; m_pPost->SetData( "Product", PRODUCT_ID ); m_pPost->SetData( "Version", PRODUCT_VER ); m_pPost->SetData( "Arch", HOOKS->GetArchName().c_str() ); diff --git a/src/archutils/Win32/CrashHandlerNetworking.cpp b/src/archutils/Win32/CrashHandlerNetworking.cpp index 0bf23a4443..a137df636c 100644 --- a/src/archutils/Win32/CrashHandlerNetworking.cpp +++ b/src/archutils/Win32/CrashHandlerNetworking.cpp @@ -161,7 +161,7 @@ NetworkStream *CreateNetworkStream() return NULL; } - return smnew NetworkStream_Win32; + return new NetworkStream_Win32; } /** @brief WinSock implementation of NetworkStream. */ diff --git a/src/archutils/Win32/ErrorStrings.cpp b/src/archutils/Win32/ErrorStrings.cpp index 0650e81b27..7f5b40b3c8 100644 --- a/src/archutils/Win32/ErrorStrings.cpp +++ b/src/archutils/Win32/ErrorStrings.cpp @@ -55,7 +55,7 @@ wstring ConvertCodepageToWString( RString s, int iCodePage ) int iBytes = MultiByteToWideChar( iCodePage, 0, s.data(), s.size(), NULL, 0 ); ASSERT_M( iBytes > 0, werr_ssprintf( GetLastError(), "MultiByteToWideChar" ).c_str() ); - wchar_t *pTemp = smnew wchar_t[iBytes]; + wchar_t *pTemp = new wchar_t[iBytes]; MultiByteToWideChar( iCodePage, 0, s.data(), s.size(), pTemp, iBytes ); wstring sRet( pTemp, iBytes ); delete [] pTemp; diff --git a/src/archutils/Win32/USB.cpp b/src/archutils/Win32/USB.cpp index b0c35dffb0..ab02bda84a 100644 --- a/src/archutils/Win32/USB.cpp +++ b/src/archutils/Win32/USB.cpp @@ -132,7 +132,7 @@ bool WindowsFileIO::Open( RString path, int iBlockSize ) if( m_pBuffer ) delete[] m_pBuffer; - m_pBuffer = smnew char[m_iBlockSize]; + m_pBuffer = new char[m_iBlockSize]; if( m_Handle != INVALID_HANDLE_VALUE ) CloseHandle( m_Handle ); @@ -193,7 +193,7 @@ int WindowsFileIO::read( void *p ) int WindowsFileIO::read_several(const vector &sources, void *p, int &actual, float timeout) { - HANDLE *Handles = smnew HANDLE[sources.size()]; + HANDLE *Handles = new HANDLE[sources.size()]; for( unsigned i = 0; i < sources.size(); ++i ) Handles[i] = sources[i]->m_Handle; diff --git a/src/ezsockets.cpp b/src/ezsockets.cpp index eb99cfa88a..5b3bc56423 100644 --- a/src/ezsockets.cpp +++ b/src/ezsockets.cpp @@ -44,8 +44,8 @@ EzSockets::EzSockets() sock = INVALID_SOCKET; blocking = true; - scks = smnew fd_set; - times = smnew timeval; + scks = new fd_set; + times = new timeval; times->tv_sec = 0; times->tv_usec = 0; state = skDISCONNECTED; diff --git a/src/global.h b/src/global.h index d885dbd358..f6f22593c0 100644 --- a/src/global.h +++ b/src/global.h @@ -152,14 +152,6 @@ void ShowWarningOrTrace( const char *file, int line, const char *message, bool b #define DEBUG_ASSERT_M(x,y) #endif -// Define a macro for new that specifies file and line information in debug only. This is used to output detailed information about -// memory leaks and makes it possible to track down the exact new call that caused them. -#if _DEBUG - #define smnew new(_NORMAL_BLOCK, __FILE__, __LINE__) -#else - #define smnew new -#endif - /* Use UNIQUE_NAME to get the line number concatenated to x. This is useful for * generating unique identifiers in other macros. */ /* XXX: VC2003 expanding __LINE__ to nothing in the first version. Investigate why. -Chris */