aboutsummaryrefslogtreecommitdiff
path: root/src/CommandListBuilder.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-01-04 01:17:25 +0100
committerMax Kellermann <max@duempel.org>2013-01-04 01:17:25 +0100
commita7d1daee93446327b5a0c35d779880354cdbf66e (patch)
treecbf9c8013495c871474dc405e513e914dde0f151 /src/CommandListBuilder.cxx
parent77a99cc61d7a39745192354594086bb90ffb0b50 (diff)
CommandListBuilder: use std::list instead of GSList
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 55b82a23..e58afccd 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;
}