parent
9eee27544d
commit
d93bd635b4
@ -55,13 +55,7 @@ string builder::flush() {
|
||||
* Insert raw text string
|
||||
*/
|
||||
void builder::append(string text) {
|
||||
string str(move(text));
|
||||
size_t len{str.length()};
|
||||
if (len > 2 && str[0] == '"' && str[len - 1] == '"') {
|
||||
m_output += str.substr(1, len - 2);
|
||||
} else {
|
||||
m_output += str;
|
||||
}
|
||||
m_output += text;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -135,6 +135,12 @@ namespace drawtypes {
|
||||
text = conf.get<string>(section, name, move(def));
|
||||
}
|
||||
|
||||
size_t len{text.size()};
|
||||
|
||||
if (len > 2 && text[0] == '"' && text[len - 1] == '"') {
|
||||
text = text.substr(1, len - 2);
|
||||
}
|
||||
|
||||
const auto get_left_right = [&](string key) {
|
||||
auto value = conf.get<int>(section, key, 0);
|
||||
auto left = conf.get<int>(section, key + "-left", value);
|
||||
|
Loading…
Reference in New Issue
Block a user