-replace "new" with "NEW" for memory leak detection
This commit is contained in:
wagic.the.homebrew@gmail.com
2009-08-27 12:48:54 +00:00
parent b02dc11f0d
commit a18b163b17
3 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -134,9 +134,9 @@ int DuelLayers::receiveEvent(WEvent * e){
if (WEventZoneChange *event = dynamic_cast<WEventZoneChange*>(e)) if (WEventZoneChange *event = dynamic_cast<WEventZoneChange*>(e))
{ {
if (event->card->view) if (event->card->view)
waiters.push_back(p = new Pos(*(event->card->view))); waiters.push_back(p = NEW Pos(*(event->card->view)));
else else
waiters.push_back(p = new Pos(0, 0, 0, 0, 255)); waiters.push_back(p = NEW Pos(0, 0, 0, 0, 255));
event->card->view = p; event->card->view = p;
} }
} }
+5 -5
View File
@@ -87,7 +87,7 @@ PIXEL_TYPE GameOption::asColor(PIXEL_TYPE fallback)
if(str.length() < 5) if(str.length() < 5)
return fallback; return fallback;
for(int i=0;i<str.length();i++) { for(size_t i=0;i<str.length();i++) {
if(isspace(str[i])) if(isspace(str[i]))
continue; continue;
if(str[i] == ','){ if(str[i] == ','){
@@ -175,7 +175,7 @@ GameSettings options;
GameSettings::GameSettings() GameSettings::GameSettings()
{ {
//Load global options //Load global options
globalOptions = new GameOptions(GLOBAL_SETTINGS); globalOptions = NEW GameOptions(GLOBAL_SETTINGS);
//Load profile options. //Load profile options.
char buf[512]; char buf[512];
@@ -203,7 +203,7 @@ GameSettings::GameSettings()
sprintf(buf,RESPATH"/themes/%s/metrics.txt",temp.c_str()); sprintf(buf,RESPATH"/themes/%s/metrics.txt",temp.c_str());
} }
themeOptions = new GameOptions(buf); themeOptions = NEW GameOptions(buf);
} }
GameSettings::~GameSettings(){ GameSettings::~GameSettings(){
@@ -293,7 +293,7 @@ void GameSettings::checkProfile(){
temp+="/stats"; temp+="/stats";
MAKEDIR(temp.c_str()); MAKEDIR(temp.c_str());
temp = profileFile(PLAYER_SETTINGS,"",false); temp = profileFile(PLAYER_SETTINGS,"",false);
profileOptions = new GameOptions(temp); profileOptions = NEW GameOptions(temp);
//Validation of collection, etc, only happens if the game is up. //Validation of collection, etc, only happens if the game is up.
if(theGame == NULL || theGame->collection == NULL) if(theGame == NULL || theGame->collection == NULL)
@@ -380,7 +380,7 @@ void GameSettings::keypadTitle(string set){
} }
SimplePad * GameSettings::keypadStart(string input, string * _dest,bool _cancel, bool _numpad, int _x,int _y ){ SimplePad * GameSettings::keypadStart(string input, string * _dest,bool _cancel, bool _numpad, int _x,int _y ){
if(keypad == NULL) if(keypad == NULL)
keypad = new SimplePad(); keypad = NEW SimplePad();
keypad->bShowCancel = _cancel; keypad->bShowCancel = _cancel;
keypad->bShowNumpad = _numpad; keypad->bShowNumpad = _numpad;
keypad->mX = _x; keypad->mX = _x;
+1 -1
View File
@@ -67,7 +67,7 @@ void GuiHandOpponent::Render()
GuiHandSelf::GuiHandSelf(CardSelector* cs, MTGHand* hand) : GuiHand(cs, hand), state(Closed), backpos(ClosedX) GuiHandSelf::GuiHandSelf(CardSelector* cs, MTGHand* hand) : GuiHand(cs, hand), state(Closed), backpos(ClosedX)
{ {
limitor = new HandLimitor(this); limitor = NEW HandLimitor(this);
} }
bool GuiHandSelf::CheckUserInput(u32 key) bool GuiHandSelf::CheckUserInput(u32 key)
{ {