summaryrefslogtreecommitdiff
path: root/src/table
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-12-17 13:33:36 +0000
committerrubidium <rubidium@openttd.org>2011-12-17 13:33:36 +0000
commit6c31b25e229ab5024c17256a72eb1b17738273e0 (patch)
tree0974618fdd0493b68f9d6064062e6acbc5c93c99 /src/table
parentb7b3ac88591ac0c9abcb4c16e3214a81a18a14b7 (diff)
downloadopenttd-6c31b25e229ab5024c17256a72eb1b17738273e0.tar.xz
(svn r23568) -Codechange: only allocate the buffer for writing when it is really needed
Diffstat (limited to 'src/table')
-rw-r--r--src/table/strgen_tables.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/table/strgen_tables.h b/src/table/strgen_tables.h
index ba852ed60..bed658eac 100644
--- a/src/table/strgen_tables.h
+++ b/src/table/strgen_tables.h
@@ -19,7 +19,8 @@ enum CmdFlags {
};
DECLARE_ENUM_AS_BIT_SET(CmdFlags)
-typedef void (*ParseCmdProc)(char *buf, int value);
+struct Buffer;
+typedef void (*ParseCmdProc)(Buffer *buffer, char *buf, int value);
struct CmdStruct {
const char *cmd;
@@ -29,9 +30,9 @@ struct CmdStruct {
CmdFlags flags;
};
-static void EmitSingleChar(char *buf, int value);
-static void EmitPlural(char *buf, int value);
-static void EmitGender(char *buf, int value);
+static void EmitSingleChar(Buffer *buffer, char *buf, int value);
+static void EmitPlural(Buffer *buffer, char *buf, int value);
+static void EmitGender(Buffer *buffer, char *buf, int value);
static const CmdStruct _cmd_structs[] = {
/* Font size */