# HG changeset patch # User glx22 # Date 2023-03-04 16:45:56 # Node ID cb0c867e815c9cc75166e356eea08ea005e21be7 # Parent abc6aff31993bd4c05ed993aece6a969e25ccf04 Codechange: Use SQInteger for generic numbers in script_priorityqueue diff --git a/src/script/api/script_priorityqueue.cpp b/src/script/api/script_priorityqueue.cpp --- a/src/script/api/script_priorityqueue.cpp +++ b/src/script/api/script_priorityqueue.cpp @@ -35,7 +35,7 @@ ScriptPriorityQueue::~ScriptPriorityQueu SQInteger ScriptPriorityQueue::Insert(HSQUIRRELVM vm) { HSQOBJECT item; - int64 priority; + SQInteger priority; sq_resetobject(&item); sq_getstackobj(vm, 2, &item); sq_getinteger(vm, 3, &priority); diff --git a/src/script/api/script_priorityqueue.hpp b/src/script/api/script_priorityqueue.hpp --- a/src/script/api/script_priorityqueue.hpp +++ b/src/script/api/script_priorityqueue.hpp @@ -21,7 +21,7 @@ */ class ScriptPriorityQueue : public ScriptObject { public: - typedef std::pair PriorityItem; + typedef std::pair PriorityItem; private: struct PriorityComparator { bool operator()(const PriorityItem &lhs, const PriorityItem &rhs) const noexcept @@ -43,7 +43,7 @@ public: * @param priority The priority to assign the item. * @return True if the item was inserted, false if it was already in the queue. */ - bool Insert(void *item, int64 priority); + bool Insert(void *item, SQInteger priority); /** * Remove and return the item with the lowest priority.