fix: pass empty filename to format_location

not to skip the first empty line
This commit is contained in:
ToruNiina
2024-06-20 21:10:42 +09:00
parent 7149b3cb29
commit 995b25efe0

View File

@@ -107,10 +107,8 @@ std::string format_location(
{
const auto lnw = detail::line_width(loc, msg, tail...);
std::ostringstream oss;
detail::format_filename(oss, loc);
return oss.str() + detail::format_location_rec(lnw, loc.file_name(), loc, msg, tail...);
const std::string f(""); // at the 1st iteration, no prev_filename is given
return detail::format_location_rec(lnw, f, loc, msg, tail...);
}
} // toml