(svn r17228) -Codechange: some coding style fixes

This commit is contained in:
rubidium
2009-08-20 10:23:39 +00:00
parent 70db6bf74f
commit c096e3d54c
13 changed files with 47 additions and 34 deletions

View File

@@ -198,7 +198,7 @@ SQInteger AIInfo::AddSetting(HSQUIRRELVM vm)
if (SQ_FAILED(sq_getinteger(vm, -1, &res))) return SQ_ERROR;
config.hard_value = res;
items |= 0x040;
} else if (strcmp(key, "random_deviation") == 0) {
} else if (strcmp(key, "random_deviation") == 0) {
SQInteger res;
if (SQ_FAILED(sq_getinteger(vm, -1, &res))) return SQ_ERROR;
config.random_deviation = res;

View File

@@ -489,13 +489,19 @@ void AIAbstractList::Sort(SorterType sorter, bool ascending)
delete this->sorter;
switch (sorter) {
case SORT_BY_ITEM:
if (ascending) this->sorter = new AIAbstractListSorterItemAscending(this);
else this->sorter = new AIAbstractListSorterItemDescending(this);
if (ascending) {
this->sorter = new AIAbstractListSorterItemAscending(this);
} else {
this->sorter = new AIAbstractListSorterItemDescending(this);
}
break;
case SORT_BY_VALUE:
if (ascending) this->sorter = new AIAbstractListSorterValueAscending(this);
else this->sorter = new AIAbstractListSorterValueDescending(this);
if (ascending) {
this->sorter = new AIAbstractListSorterValueAscending(this);
} else {
this->sorter = new AIAbstractListSorterValueDescending(this);
}
break;
default: