summaryrefslogtreecommitdiff
path: root/src/strgen
diff options
context:
space:
mode:
Diffstat (limited to 'src/strgen')
-rw-r--r--src/strgen/strgen.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/strgen/strgen.cpp b/src/strgen/strgen.cpp
index 4268f0bbb..9b6ae5102 100644
--- a/src/strgen/strgen.cpp
+++ b/src/strgen/strgen.cpp
@@ -845,7 +845,7 @@ static void HandleString(char *str, bool master)
}
// Allocate a new LangString
- CallocT(&ent, 1);
+ ent = CallocT<LangString>(1);
_strings[_next_string_id] = ent;
ent->index = _next_string_id++;
ent->name = strdup(str);
@@ -855,8 +855,7 @@ static void HandleString(char *str, bool master)
}
if (casep != NULL) {
- Case* c;
- MallocT(&c, 1);
+ Case* c = MallocT<Case>(1);
c->caseidx = ResolveCaseName(casep, strlen(casep));
c->string = strdup(s);
@@ -885,8 +884,7 @@ static void HandleString(char *str, bool master)
if (!CheckCommandsMatch(s, ent->english, str)) return;
if (casep != NULL) {
- Case* c;
- MallocT(&c, 1);
+ Case* c = MallocT<Case>(1);
c->caseidx = ResolveCaseName(casep, strlen(casep));
c->string = strdup(s);