mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-06 18:08:10 +00:00
Return the indentation unit instead of an empty string with indent("",n)
This commit is contained in:
parent
f229367ca1
commit
dd9b53f0de
@ -747,16 +747,16 @@ bool wildcard_string_match(const std::string& str, const std::string& match) {
|
||||
|
||||
std::string indent(const std::string& string, size_t indent_size)
|
||||
{
|
||||
if(string.empty()) {
|
||||
return "";
|
||||
}
|
||||
|
||||
if(indent_size == 0) {
|
||||
return string;
|
||||
}
|
||||
|
||||
const std::string indent(indent_size, ' ');
|
||||
|
||||
if(string.empty()) {
|
||||
return indent;
|
||||
}
|
||||
|
||||
const std::vector<std::string>& lines = split(string, '\x0A', 0);
|
||||
std::string res;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user