mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 05:00:55 +01:00
Merge pull request #21775 from MrStonedOne/patch-263
Faster listclearnulls()
This commit is contained in:
@@ -104,13 +104,8 @@
|
||||
|
||||
//Removes any null entries from the list
|
||||
/proc/listclearnulls(list/L)
|
||||
if(istype(L))
|
||||
var/i=1
|
||||
for(var/thing in L)
|
||||
if(thing != null)
|
||||
++i
|
||||
continue
|
||||
L.Cut(i,i+1)
|
||||
var/list/N = new(L.len)
|
||||
L -= N
|
||||
|
||||
/*
|
||||
* Returns list containing all the entries from first list that are not present in second.
|
||||
@@ -412,4 +407,4 @@
|
||||
|
||||
#define UNSETEMPTY(L) if (L && !L.len) L = null
|
||||
|
||||
#define LAZYLEN(L) ( L ? L.len : 0 )
|
||||
#define LAZYLEN(L) ( L ? L.len : 0 )
|
||||
|
||||
Reference in New Issue
Block a user