diff --git a/config.cpp b/config.cpp index a942d42a..d9cd87de 100644 --- a/config.cpp +++ b/config.cpp @@ -770,9 +770,7 @@ EX shared_ptr param_colortable(colortable& val, const paramete u->custom_value = [] () { return -1; }; u->custom_affect = [&val] (void *v) { return &val == v; }; u->custom_load = [&val] (const string& s) { - auto seq = split_string(s, ','); - val.resize(isize(seq)); - for(int i=0; icustom_save = [&val] { bool first = true; diff --git a/util.cpp b/util.cpp index 13a8e6a9..9b1f9b71 100644 --- a/util.cpp +++ b/util.cpp @@ -615,6 +615,17 @@ EX color_t parsecolor(const string& s, bool has_alpha) { return col; } +EX colortable parsecolortable(const string& s) { + colortable tab; + tab.clear(); + exp_parser ep; + ep.s = s; + tab.push_back(ep.parsecolor() >> 8); + while(ep.eat(",")) + tab.push_back(ep.parsecolor() >> 8); + return tab; + } + EX trans23 parsematrix23(const string& s) { trans23 t; #if MAXMDIM == 3