From: Amadeusz Sławiński Date: Wed, 22 Feb 2017 14:03:04 +0000 (+0100) Subject: reduce scope of variables X-Git-Tag: xonotic-v0.8.5~2843^2~2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=9e593ef8b1466b325065e85cccab8144fac302e6;p=xonotic%2Fxonotic-data.pk3dir.git reduce scope of variables --- diff --git a/qcsrc/common/util.qc b/qcsrc/common/util.qc index e68d19c07..16467f3fa 100644 --- a/qcsrc/common/util.qc +++ b/qcsrc/common/util.qc @@ -425,15 +425,12 @@ string mapPriorityList(string order, string(string) mapfunc) string swapInPriorityList(string order, float i, float j) { - string s; - float w, n; - - n = tokenize_console(order); + float n = tokenize_console(order); if(i >= 0 && i < n && j >= 0 && j < n && i != j) { - s = ""; - for(w = 0; w < n; ++w) + string s = ""; + for(float w = 0; w < n; ++w) { if(w == i) s = strcat(s, argv(j), " ");