When possible use simpler LOG_* macros instead of LOG_*F
authorterencehill <piuntn@gmail.com>
Fri, 15 Feb 2019 17:47:22 +0000 (18:47 +0100)
committerterencehill <piuntn@gmail.com>
Fri, 15 Feb 2019 17:47:22 +0000 (18:47 +0100)
qcsrc/common/debug.qh
qcsrc/common/physics/movetypes/movetypes.qc
qcsrc/lib/intrusivelist.qh
qcsrc/menu/command/menu_cmd.qc
qcsrc/server/bot/default/waypoints.qc
qcsrc/server/command/common.qc
qcsrc/server/command/sv_cmd.qc
qcsrc/server/g_world.qc

index a8a76e4..55b634a 100644 (file)
@@ -205,8 +205,7 @@ GENERIC_COMMAND(bufstr_get, "Examine a string buffer object")
                {
                        int bufhandle = stof(argv(1));
                        int string_index = stof(argv(2));
-                       string s = bufstr_get(bufhandle, string_index);
-                       LOG_INFOF("%s", s);
+                       LOG_INFO(bufstr_get(bufhandle, string_index));
                        return;
                }
 
index 6a53e57..cbb54cd 100644 (file)
@@ -540,7 +540,7 @@ void _Movetype_Physics_Frame(entity this, float movedt)
        {
                case MOVETYPE_PUSH:
                case MOVETYPE_FAKEPUSH:
-                       LOG_DEBUGF("Physics: Lacking QuakeC support for Push movetype, FIX ME by using engine physics!");
+                       LOG_DEBUG("Physics: Lacking QuakeC support for Push movetype, FIX ME by using engine physics!");
                        break;
                case MOVETYPE_NONE:
                        break;
@@ -582,7 +582,7 @@ void _Movetype_Physics_ClientFrame(entity this, float movedt)
        {
                case MOVETYPE_PUSH:
                case MOVETYPE_FAKEPUSH:
-                       LOG_DEBUGF("Physics: Lacking QuakeC support for Push movetype, FIX ME by using engine physics!");
+                       LOG_DEBUG("Physics: Lacking QuakeC support for Push movetype, FIX ME by using engine physics!");
                        break;
                case MOVETYPE_NONE:
                        break;
index 9b721a9..279210f 100644 (file)
@@ -212,7 +212,7 @@ void IL_INIT(IntrusiveList this)
                        return;
                }
        }
-       LOG_WARNF("IntrusiveList overflow");
+       LOG_WARN("IntrusiveList overflow");
 }
 
 ERASEABLE
index a06ac8e..93deaff 100644 (file)
@@ -88,7 +88,7 @@ void GameCommand(string theCommand)
                                        if (!startsWith(s, filter)) continue;
                                        s = substring(s, strlen(filter), strlen(s) - strlen(filter));
                                }
-                               LOG_INFOF(" %s", s);
+                               LOG_INFO(" ", s);
                        });
                }
                else if (argc == 2 && !isdemo())     // don't allow this command in demos
index 1ef4c8c..9de3779 100644 (file)
@@ -31,7 +31,7 @@ void waypoint_unreachable(entity pl)
        entity e2 = navigation_findnearestwaypoint(pl, false);
        if(!e2)
        {
-               LOG_INFOF("Can't find any waypoint nearby\n");
+               LOG_INFO("Can't find any waypoint nearby\n");
                return;
        }
 
index fd0375c..6121867 100644 (file)
@@ -437,7 +437,7 @@ void CommonCommand_editmob(int request, entity caller, int argc)
                                case "butcher":
                                {
                                        if (caller) { print_to(caller, "This command is not available to players"); return; }
-                                       if (MUTATOR_CALLHOOK(AllowMobButcher)) { LOG_INFOF("%s", M_ARGV(0, string)); return; }
+                                       if (MUTATOR_CALLHOOK(AllowMobButcher)) { LOG_INFO(M_ARGV(0, string)); return; }
 
                                        int tmp_remcount = 0;
 
index 1a77e4f..e8fc1b1 100644 (file)
@@ -794,8 +794,8 @@ void GameCommand_gettaginfo(int request, int argc)
                                {
                                        v = gettaginfo(tmp_entity, i);
                                        LOG_INFOF(
-                                           "model %s frame %s tag %s index %s parent %s",
-                                           tmp_entity.model, ftos(tmp_entity.frame), gettaginfo_name, ftos(i), ftos(gettaginfo_parent)
+                                               "model %s frame %s tag %s index %s parent %s",
+                                               tmp_entity.model, ftos(tmp_entity.frame), gettaginfo_name, ftos(i), ftos(gettaginfo_parent)
                                        );
                                        LOG_INFOF(" vector = %s %s %s", ftos(v.x), ftos(v.y), ftos(v.z));
                                        LOG_INFOF(" offset = %s %s %s", ftos(gettaginfo_offset.x), ftos(gettaginfo_offset.y), ftos(gettaginfo_offset.z));
index cf4128d..9ef72ae 100644 (file)
@@ -640,7 +640,7 @@ spawnfunc(worldspawn)
 {
        server_is_dedicated = boolean(stof(cvar_defstring("is_dedicated")));
 
-    bool wantrestart = false;
+       bool wantrestart = false;
        {
                if (!server_is_dedicated)
                {
@@ -695,7 +695,7 @@ spawnfunc(worldspawn)
                }
                if (wantrestart)
                {
-                       LOG_INFOF("Restart requested");
+                       LOG_INFO("Restart requested");
                        changelevel(mapname);
                        // let initialization continue, shutdown depends on it
                }
@@ -774,7 +774,7 @@ spawnfunc(worldspawn)
        readlevelcvars();
        GrappleHookInit();
 
-    GameRules_limit_fallbacks();
+       GameRules_limit_fallbacks();
 
        if(warmup_limit == 0)
                warmup_limit = (autocvar_timelimit > 0) ? autocvar_timelimit * 60 : autocvar_timelimit;