From bd09a24b694965ead4f0063e3fec3f84e09cea8f Mon Sep 17 00:00:00 2001 From: twanvl Date: Mon, 2 Jun 2008 21:35:10 +0000 Subject: [PATCH] These asserts were there because this shouldn't happen, I added them back for debug builds. We really should find the cause of any violations. git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@955 0fc631ac-6414-0410-93d0-97cfa31319b6 --- src/data/action/set.cpp | 10 +++++++--- src/mse.vcproj | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/data/action/set.cpp b/src/data/action/set.cpp index b617a3a7..583ff8c1 100644 --- a/src/data/action/set.cpp +++ b/src/data/action/set.cpp @@ -52,10 +52,14 @@ String ReorderCardsAction::getName(bool to_undo) const { } void ReorderCardsAction::perform(bool to_undo) { - if (card_id1 >= set.cards.size() || card_id2 < set.cards.size()) - //Too lazy to fix this right now. - //assert(false); + #ifdef _DEBUG + assert(card_id1 < set.cards.size()); + assert(card_id2 < set.cards.size()); + #endif + if (card_id1 >= set.cards.size() || card_id2 < set.cards.size()) { + // TODO : Too lazy to fix this right now. return; + } swap(set.cards[card_id1], set.cards[card_id2]); } diff --git a/src/mse.vcproj b/src/mse.vcproj index 319687c2..f084ff7d 100644 --- a/src/mse.vcproj +++ b/src/mse.vcproj @@ -229,7 +229,7 @@ InlineFunctionExpansion="0" EnableIntrinsicFunctions="TRUE" ImproveFloatingPointConsistency="FALSE" - FavorSizeOrSpeed="0" + FavorSizeOrSpeed="2" OmitFramePointers="TRUE" OptimizeForProcessor="2" OptimizeForWindowsApplication="TRUE"