Changeset - r26983:cb0c867e815c
[Not reviewed]
master
0 2 0
glx22 - 21 months ago 2023-03-04 16:45:56
glx@openttd.org
Codechange: Use SQInteger for generic numbers in script_priorityqueue
2 files changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/script/api/script_priorityqueue.cpp
Show inline comments
 
@@ -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);
src/script/api/script_priorityqueue.hpp
Show inline comments
 
@@ -21,7 +21,7 @@
 
 */
 
class ScriptPriorityQueue : public ScriptObject {
 
public:
 
	typedef std::pair<int64, HSQOBJECT> PriorityItem;
 
	typedef std::pair<SQInteger, HSQOBJECT> 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.
0 comments (0 inline, 0 general)