From e750e3780cc4b3baa1348e76e5e19a884d37c828 Mon Sep 17 00:00:00 2001 From: TimePath Date: Sun, 14 Aug 2016 21:37:30 +1000 Subject: [PATCH] Delete unused_float --- qcsrc/common/command/markup.qc | 1 - qcsrc/common/util.qh | 3 --- qcsrc/lib/csqcmodel/sv_model.qc | 10 +++------- qcsrc/menu/xonotic/util.qc | 6 ------ 4 files changed, 3 insertions(+), 17 deletions(-) diff --git a/qcsrc/common/command/markup.qc b/qcsrc/common/command/markup.qc index 9f0883bd6..583c61e55 100644 --- a/qcsrc/common/command/markup.qc +++ b/qcsrc/common/command/markup.qc @@ -53,7 +53,6 @@ void GenericCommand_markup_init() markup_from[i] = "&.."; markup_to[i] = "\x9e"; ++i; markup_from[i] = "&.)"; markup_to[i] = "\x9f"; ++i; markup_from[i] = "&<|"; markup_to[i] = "\xff"; ++i; - unused_float = i; } string GenericCommand_markup(string s2) diff --git a/qcsrc/common/util.qh b/qcsrc/common/util.qh index 81acde950..599dd4d43 100644 --- a/qcsrc/common/util.qh +++ b/qcsrc/common/util.qh @@ -231,9 +231,6 @@ float ReadApproxPastTime(); void execute_next_frame(); void queue_to_execute_next_frame(string s); -// for marking written-to values as unused where it's a good idea to do this -noref float unused_float; - // a function f with: // f(0) = 0 // f(1) = 1 diff --git a/qcsrc/lib/csqcmodel/sv_model.qc b/qcsrc/lib/csqcmodel/sv_model.qc index d495ae015..0f8ef06ac 100644 --- a/qcsrc/lib/csqcmodel/sv_model.qc +++ b/qcsrc/lib/csqcmodel/sv_model.qc @@ -64,13 +64,9 @@ bool CSQCModel_Send(entity this, entity to, int sf) void CSQCModel_CheckUpdate(entity e) { // some nice flags for CSQCMODEL_IF - float isplayer = IS_CLIENT(e); - float islocalplayer = isplayer; // we set BOTH to 1 here as we need the sendflags - float isnolocalplayer = isplayer; // we set BOTH to 1 here as we need the sendflags - - unused_float = isplayer; - unused_float = islocalplayer; - unused_float = isnolocalplayer; + noref float isplayer = IS_CLIENT(e); + noref float islocalplayer = isplayer; // we set BOTH to 1 here as we need the sendflags + noref float isnolocalplayer = isplayer; // we set BOTH to 1 here as we need the sendflags #if CSQCPLAYER_FORCE_UPDATES if(isplayer && time > e.csqcmodel_nextforcedupdate) diff --git a/qcsrc/menu/xonotic/util.qc b/qcsrc/menu/xonotic/util.qc index d55fa4d6d..9cc4da8c3 100644 --- a/qcsrc/menu/xonotic/util.qc +++ b/qcsrc/menu/xonotic/util.qc @@ -693,24 +693,18 @@ float updateCompression() Gametype GameType_GetID(int cnt) { int i = 0; - #define GAMETYPE(it) { if (i++ == cnt) return it; } GAMETYPES #undef GAMETYPE - - unused_float = i; - return NULL; } int GameType_GetCount() { int i = 0; - #define GAMETYPE(id) ++i; GAMETYPES #undef GAMETYPE - return i; } -- 2.39.2