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