浏览代码

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