1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-02-03 13:01:33 +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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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