Переглянути джерело

JsonParser::error(): Use empty()

Co-authored-by: Andrey Filipenkov <[email protected]>
Alexander Wilms 1 рік тому
батько
коміт
f22a3d6168
1 змінених файлів з 1 додано та 1 видалено
  1. 1 1
      lib/json/JsonParser.cpp

+ 1 - 1
lib/json/JsonParser.cpp

@@ -587,7 +587,7 @@ bool JsonParser::error(const std::string & message, bool warning)
 	std::ostringstream stream;
 	std::ostringstream stream;
 	std::string type(warning ? " warning: " : " error: ");
 	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
 		// only add the line breaks between error messages so we don't have a trailing line break
 		stream << "\n";
 		stream << "\n";