]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/util.qc
reduce scope of variables
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / util.qc
index e68d19c075b212e42715ec19e3992e7e66e27cd6..16467f3fac087edea71ed29375f6d4f9d642ac1d 100644 (file)
@@ -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), " ");