mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-21 20:20:33 +01:00
[MIRROR] Change signature of BINARY_INSERT to require the full type path, add test (#611)
* Change signature of BINARY_INSERT to require the full type path, add test (#53217) BINARY_INSERT used to only take typepaths like/this. Now, it expects them to be /like/this, to be more consistent with ther est of the code. Adds documentation to COMPTYPE. Adds a test for BINARY_INSERT. * Change signature of BINARY_INSERT to require the full type path, add test Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
This commit is contained in:
@@ -158,7 +158,7 @@ SUBSYSTEM_DEF(runechat)
|
||||
|
||||
// Handle insertion into the secondary queue if the required time is outside our tracked amounts
|
||||
if (scheduled_destruction >= BUCKET_LIMIT)
|
||||
BINARY_INSERT(src, SSrunechat.second_queue, datum/chatmessage, src, scheduled_destruction, COMPARE_KEY)
|
||||
BINARY_INSERT(src, SSrunechat.second_queue, /datum/chatmessage, src, scheduled_destruction, COMPARE_KEY)
|
||||
return
|
||||
|
||||
// Get bucket position and a local reference to the datum var, it's faster to access this way
|
||||
|
||||
@@ -122,7 +122,7 @@ SUBSYSTEM_DEF(timer)
|
||||
if(ctime_timer.flags & TIMER_LOOP)
|
||||
ctime_timer.spent = 0
|
||||
ctime_timer.timeToRun = REALTIMEOFDAY + ctime_timer.wait
|
||||
BINARY_INSERT(ctime_timer, clienttime_timers, datum/timedevent, ctime_timer, timeToRun, COMPARE_KEY)
|
||||
BINARY_INSERT(ctime_timer, clienttime_timers, /datum/timedevent, ctime_timer, timeToRun, COMPARE_KEY)
|
||||
else
|
||||
qdel(ctime_timer)
|
||||
|
||||
@@ -525,7 +525,7 @@ SUBSYSTEM_DEF(timer)
|
||||
else if (timeToRun >= TIMER_MAX)
|
||||
L = SStimer.second_queue
|
||||
if(L)
|
||||
BINARY_INSERT(src, L, datum/timedevent, src, timeToRun, COMPARE_KEY)
|
||||
BINARY_INSERT(src, L, /datum/timedevent, src, timeToRun, COMPARE_KEY)
|
||||
return
|
||||
|
||||
// Get a local reference to the bucket list, this is faster than referencing the datum
|
||||
|
||||
Reference in New Issue
Block a user