/* $Id$ */
/** @file ai_abstractlist.cpp Implementation of AIAbstractList. */
#include <squirrel.h>
#include "ai_abstractlist.hpp"
#include "../../debug.h"
#include "../../core/alloc_func.hpp"
#include "../../script/squirrel.hpp"
/**
* Base class for any AIAbstractList sorter.
*/
class AIAbstractListSorter {
protected:
AIAbstractList *list;
public:
* Virtual dtor, needed to mute warnings.
@@ -809,20 +810,22 @@ SQInteger AIAbstractList::Valuate(HSQUIR
sq_release(vm, &obj_func);
for (int i = 0; i < nparam; i++) sq_release(vm, &obj_params[i]);
AIObject::SetAllowDoCommand(true);
return sq_throwerror(vm, _SC("return value of valuator is not valid (not integer/bool)"));
}
/* Remove junk */
sq_pop(vm, 2);
(*iter).second = (int32)value;
this->buckets[(int32)value].insert((*iter).first);
Squirrel::DecreaseOps(vm, 5);
return 0;