From 9e593ef8b1466b325065e85cccab8144fac302e6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Amadeusz=20S=C5=82awi=C5=84ski?= Date: Wed, 22 Feb 2017 15:03:04 +0100 Subject: [PATCH] reduce scope of variables --- qcsrc/common/util.qc | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/qcsrc/common/util.qc b/qcsrc/common/util.qc index e68d19c075..16467f3fac 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), " "); -- 2.39.2