1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-17 01:32:21 +02:00

JsonParser::error(): Use empty()

Co-authored-by: Andrey Filipenkov <kambaladecapitator@gmail.com>
This commit is contained in:
Alexander Wilms
2024-07-16 10:30:00 +02:00
committed by GitHub
parent 466318b77b
commit f22a3d6168

View File

@ -587,7 +587,7 @@ bool JsonParser::error(const std::string & message, bool warning)
std::ostringstream stream;
std::string type(warning ? " warning: " : " error: ");
if(errors != "")
if(!errors.empty())
{
// only add the line breaks between error messages so we don't have a trailing line break
stream << "\n";