aboutsummaryrefslogtreecommitdiffstats
path: root/src/CommandListBuilder.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/CommandListBuilder.cxx')
-rw-r--r--src/CommandListBuilder.cxx9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/CommandListBuilder.cxx b/src/CommandListBuilder.cxx
index 55b82a238..e58afccd1 100644
--- a/src/CommandListBuilder.cxx
+++ b/src/CommandListBuilder.cxx
@@ -25,12 +25,7 @@
void
CommandListBuilder::Reset()
{
- for (GSList *tmp = list; tmp != NULL; tmp = g_slist_next(tmp))
- g_free(tmp->data);
-
- g_slist_free(list);
-
- list = nullptr;
+ list.clear();
mode = Mode::DISABLED;
}
@@ -42,6 +37,6 @@ CommandListBuilder::Add(const char *cmd)
if (size > client_max_command_list_size)
return false;
- list = g_slist_prepend(list, g_strdup(cmd));
+ list.emplace_back(cmd);
return true;
}