fixed several linter warnings (#26977)

This commit is contained in:
DamianX
2020-06-30 21:13:50 +02:00
committed by GitHub
parent 6c2410e4db
commit b5f52ccb4b
11 changed files with 15 additions and 29 deletions

View File

@@ -228,8 +228,6 @@ var/forum_authenticated_group = "10"
var/fileaccess_timer = 0
var/custom_event_msg = null
#define MIDNIGHT_ROLLOVER 864000 //number of deciseconds in a day
//Recall time limit: 2 hours
var/recall_time_limit = 72000

View File

@@ -1,5 +1,5 @@
#define PROFILE_START ;PROFILE_STORE = list();PROFILE_SET;
#define PROFILE_STOP ;PROFILE_STORE = null;
#define LINE_PROFILE_START ;PROFILE_STORE = list();PROFILE_SET;
#define LINE_PROFILE_STOP ;PROFILE_STORE = null;
#define PROFILE_SET ;PROFILE_TIME = world.tick_usage; PROFILE_LINE = __LINE__; PROFILE_FILE = __FILE__; PROFILE_SLEEPCHECK = world.time;

View File

@@ -1,16 +1,5 @@
#define HTMLTAB "    "
#define string2charlist(string) (splittext(string, regex("(.)")) - splittext(string, ""))
//Loops through every line in (text). The 'line' variable holds the current line
//Example use:
/*
var/text = {"Line 1
Line 2
Line 3
"}
forLineInText(text)
world.log << line
*/
#define forLineInText(text) for({var/__index=1;var/line=copytext(text, __index, findtext(text, "\n", __index))} ; {__index != 0} ; {__index = findtext(text, "\n", __index+1) ; line = copytext(text, __index+1, findtext(text, "\n", __index+1))})
/*
* Holds procs designed to help with filtering text

View File

@@ -1,6 +1,6 @@
/world/proc/_BSQL_Internal_Call(func, ...)
var/list/call_args = args.Copy(2)
BSQL_Debug("[.....]: [args[1]]([call_args.Join(", ")])")
BSQL_Debug("_BSQL_Internal_Call: [args[1]]([call_args.Join(", ")])")
. = call(_BSQL_Library_Path(), func)(arglist(call_args))
BSQL_Debug("Result: [. == null ? "NULL" : "\"[.]\""]")

View File

@@ -1377,7 +1377,7 @@ client/proc/check_convertables()
set name = "Start line profiling"
set desc = "Starts tracking line by line profiling for code lines that support it"
PROFILE_START
LINE_PROFILE_START
message_admins("<span class='adminnotice'>[key_name_admin(src)] started line by line profiling.</span>")
feedback_add_details("admin_verb","Start line profiling")
@@ -1388,7 +1388,7 @@ client/proc/check_convertables()
set name = "Stop line profiling"
set desc = "Stops tracking line by line profiling for code lines that support it"
PROFILE_STOP
LINE_PROFILE_STOP
message_admins("<span class='adminnotice'>[key_name_admin(src)] stopped line by line profiling.</span>")
feedback_add_details("admin_verb","Stop line profiling")

View File

@@ -412,7 +412,7 @@
if(mask_charge >= word_cost)
mask_charge -= word_cost
playsound(src, "sound/vox_hecu/[words_to_say[i]]!.wav", 30)
sleep word_delay
sleep(word_delay)
words_to_say.Cut()
/obj/item/clothing/mask/gas/hecu/equipped(var/mob/user, var/slot)

View File

@@ -569,8 +569,7 @@ var/global/list/loopModeNames=list(
var/success = 0
var/error = 0
//Loop through each line
forLineInText(choice)
for(var/line in splittext(choice, "\n"))
var/list/L = params2list(line)
if(L.len >= 3)
var/list/params = list()

View File

@@ -268,7 +268,7 @@
var/spin_delay = 1 SECONDS //let's not get crazy
gun_flags = EMPTYCASINGS | CHAMBERSPENT
./obj/item/weapon/gun/projectile/colt/examine(mob/user)
/obj/item/weapon/gun/projectile/colt/examine(mob/user)
..()
if(user.is_holding_item(src))
to_chat(user,"<span class='info'>Alt-click to spin the gun.</span>")

View File

@@ -209,7 +209,7 @@
var/datum/stack/val = new
src.expecting = VALUE
var/loop = 0
for()
while(TRUE)
loop++
if(loop > 800)
errors += new/datum/scriptError("Too many nested tokens.")
@@ -327,7 +327,7 @@
NextToken() //skip open parenthesis, already found
var/loops = 0
for()
while(TRUE)
loops++
if(loops >= 800)
errors += new/datum/scriptError("Too many nested expressions.")

View File

@@ -174,7 +174,7 @@ var/const/Represents a special statement in the code triggered by a keyword.
if(!parser.CheckToken("(", /datum/token/symbol))
return KW_FAIL
for() //for now parameters can be separated by whitespace - they don't need a comma in between
while(TRUE) //for now parameters can be separated by whitespace - they don't need a comma in between
if(istype(parser.curToken, /datum/token/symbol))
switch(parser.curToken.value)
if(",")

View File

@@ -185,7 +185,7 @@
if(!CheckToken("(", /datum/token/symbol)) //Check for and skip open parenthesis
return
var/loops = 0
for()
while(TRUE)
loops++
if(loops >= 800)
errors +=new/datum/scriptError("Cannot find ending params.")