Return the indentation unit instead of an empty string with indent("",n)

This commit is contained in:
Ignacio R. Morelle 2014-02-16 04:23:19 -03:00
parent f229367ca1
commit dd9b53f0de

View File

@ -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;