Commit 72d317b4 authored by Kamil Iskra's avatar Kamil Iskra

Avoid C+11 constructs to work with gcc 4.9

parent 174a63f7
......@@ -684,8 +684,8 @@ void Container_manager::alter_service_os(string command)
#endif
String_parser sp(command);
sp.parse();
vector<string> allowed_keys(
{"cpus", "+cpus", "-cpus", "mems", "+mems", "-mems", "mem_migrate"});
const char* initkeys[] = {"cpus", "+cpus", "-cpus", "mems", "+mems", "-mems", "mem_migrate"};
vector<string> allowed_keys(initkeys, initkeys + sizeof(initkeys) / sizeof(initkeys[0]));
THROW_ON_BAD_INPUT_IF(sp.has_forbidden_keys(allowed_keys),
"Invalid service_os alteration command");
......@@ -769,7 +769,8 @@ void Container_manager::create_service_os(string command)
"The node already has a service_os");
String_parser sp(command);
sp.parse();
vector<string> allowed_keys({"cpus", "mems"});
const char* initkeys[] = {"cpus", "mems"};
vector<string> allowed_keys(initkeys, initkeys + sizeof(initkeys) / sizeof(initkeys[0]));
THROW_ON_BAD_INPUT_IF(sp.has_forbidden_keys(allowed_keys),
"Invalid service_os creation command");
......@@ -1099,7 +1100,7 @@ void Container_manager::exec(string command)
/* Remove a single layer of backslashes. */
for (vector<string>::iterator i = argvs.begin(); i != argvs.end(); ++i)
for (auto j = i->begin(); j != i->end(); ++j)
for (string::iterator j = i->begin(); j != i->end(); ++j)
if (*j == '\\')
i->erase(j);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment