]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Reduce function calls when writing 2 multi-line messages
authorterencehill <piuntn@gmail.com>
Fri, 8 Feb 2019 23:30:42 +0000 (00:30 +0100)
committerterencehill <piuntn@gmail.com>
Fri, 8 Feb 2019 23:30:42 +0000 (00:30 +0100)
qcsrc/common/effects/effectinfo.qc
qcsrc/common/notifications/all.qc

index 474d41d1e74f5eba38f77312cd5f367529aaca4b..68c245db4a7df2674b7ceb79ddd061234b3ff7fd 100644 (file)
@@ -264,17 +264,18 @@ void effectinfo_read()
 void effectinfo_dump(int fh, bool alsoprint)
 {
        #define WRITE(str) write_String_To_File(fh, str, alsoprint)
-    WRITE("// ********************************************** //\n");
-    WRITE("// ** WARNING - DO NOT MANUALLY EDIT THIS FILE ** //\n");
-    WRITE("// **                                          ** //\n");
-    WRITE("// **  This file is automatically generated by ** //\n");
-    WRITE("// **  code with the command 'dumpeffectinfo'. ** //\n");
-    WRITE("// **                                          ** //\n");
-    WRITE("// **  If you modify an effect, please         ** //\n");
-    WRITE("// **  regenerate this file with that command. ** //\n");
-    WRITE("// **                                          ** //\n");
-    WRITE("// ********************************************** //\n");
-    WRITE("\n");
+       WRITE(
+               "// ********************************************** //\n"
+               "// ** WARNING - DO NOT MANUALLY EDIT THIS FILE ** //\n"
+               "// **                                          ** //\n"
+               "// **  This file is automatically generated by ** //\n"
+               "// **  code with the command 'dumpeffectinfo'. ** //\n"
+               "// **                                          ** //\n"
+               "// **  If you modify an effect, please         ** //\n"
+               "// **  regenerate this file with that command. ** //\n"
+               "// **                                          ** //\n"
+               "// ********************************************** //\n"
+               "\n");
 
     for (EffectInfo it = NULL; (it = findfloat(it, instanceOfEffectInfo, true)); ) {
         if (it.classname == "vtbl") continue;
index 107397758e04887022f705d60ab36716518b028d..11ebffacfa4e8762fe37d152185124005127b553 100644 (file)
@@ -801,18 +801,19 @@ void Dump_Notifications(int fh, bool alsoprint)
        // notification variables for mutators or game modes or such and then
        // regenerate the notifications.cfg file from the new code.
 
-       NOTIF_WRITE("// ********************************************** //\n");
-       NOTIF_WRITE("// ** WARNING - DO NOT MANUALLY EDIT THIS FILE ** //\n");
-       NOTIF_WRITE("// **                                          ** //\n");
-       NOTIF_WRITE("// **  This file is automatically generated    ** //\n");
-       NOTIF_WRITE("// **  by code with the command 'dumpnotifs'.  ** //\n");
-       NOTIF_WRITE("// **                                          ** //\n");
-       NOTIF_WRITE("// **  If you add a new notification, please   ** //\n");
-       NOTIF_WRITE("// **  regenerate this file with that command  ** //\n");
-       NOTIF_WRITE("// **  making sure that the output matches     ** //\n");
-       NOTIF_WRITE("// **  with the lists and defaults in code.    ** //\n");
-       NOTIF_WRITE("// **                                          ** //\n");
-       NOTIF_WRITE("// ********************************************** //\n");
+       NOTIF_WRITE(
+               "// ********************************************** //\n"
+               "// ** WARNING - DO NOT MANUALLY EDIT THIS FILE ** //\n"
+               "// **                                          ** //\n"
+               "// **  This file is automatically generated    ** //\n"
+               "// **  by code with the command 'dumpnotifs'.  ** //\n"
+               "// **                                          ** //\n"
+               "// **  If you add a new notification, please   ** //\n"
+               "// **  regenerate this file with that command  ** //\n"
+               "// **  making sure that the output matches     ** //\n"
+               "// **  with the lists and defaults in code.    ** //\n"
+               "// **                                          ** //\n"
+               "// ********************************************** //\n");
 
        // These notifications will also append their string as a comment...
        // This is not necessary, and does not matter if they vary between config versions,