]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
reduce variable scope
authorAmadeusz Sławiński <amade@asmblr.net>
Wed, 22 Feb 2017 13:41:56 +0000 (14:41 +0100)
committerAmadeusz Sławiński <amade@asmblr.net>
Wed, 22 Feb 2017 13:41:56 +0000 (14:41 +0100)
qcsrc/common/t_items.qc

index e5c6218b1289f0e4e923058c1e537ab3c125344d..ffaa59fd0fce6028c0d5b17b6103031075bbc7d5 100644 (file)
@@ -1480,7 +1480,7 @@ void target_items_use(entity this, entity actor, entity trigger)
 
 spawnfunc(target_items)
 {
-       int n, j;
+       int n;
        string s;
 
        this.use = target_items_use;
@@ -1498,7 +1498,7 @@ spawnfunc(target_items)
        }
        else
        {
-               for(j = 0; j < n; ++j)
+               for(int j = 0; j < n; ++j)
                {
                        if     (argv(j) == "unlimited_ammo")         this.items |= IT_UNLIMITED_AMMO;
                        else if(argv(j) == "unlimited_weapon_ammo")  this.items |= IT_UNLIMITED_WEAPON_AMMO;
@@ -1582,7 +1582,7 @@ spawnfunc(target_items)
        //print(this.netname, "\n");
 
        n = tokenize_console(this.netname);
-       for(j = 0; j < n; ++j)
+       for(int j = 0; j < n; ++j)
        {
                FOREACH(Weapons, it != WEP_Null && W_UndeprecateName(argv(j)) == it.netname, {
             it.wr_init(it);