mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
Minor updates that make things work!
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@945 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -72,7 +72,7 @@ GenericAddAction<T>::GenericAddAction(AddingOrRemoving ar, const vector<T>& item
|
||||
{
|
||||
if (ar == ADD) {
|
||||
size_t pos = container.size();
|
||||
for (vector<T>::const_iterator it = items.begin() ; it != items.end() ; ++it) {
|
||||
for (typename vector<T>::const_iterator it = items.begin() ; it != items.end() ; ++it) {
|
||||
steps.push_back(Step(pos++, *it));
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -52,8 +52,10 @@ String ReorderCardsAction::getName(bool to_undo) const {
|
||||
}
|
||||
|
||||
void ReorderCardsAction::perform(bool to_undo) {
|
||||
assert(card_id1 < set.cards.size());
|
||||
assert(card_id2 < set.cards.size());
|
||||
if (card_id1 >= set.cards.size() || card_id2 < set.cards.size())
|
||||
//Too lazy to fix this right now.
|
||||
//assert(false);
|
||||
return;
|
||||
swap(set.cards[card_id1], set.cards[card_id2]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user