clang-tidy: don't use string compare
Found with readability-string-compare Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
committed by
Luis Díaz Más
parent
8337462032
commit
143a1fbbe2
@@ -147,15 +147,12 @@ Jzon::Node& objectForKey(const std::string& Key,Jzon::Object& root,std::string&
|
||||
|
||||
bool isObject(std::string& value)
|
||||
{
|
||||
return !value.compare(std::string("type=\"Struct\""));
|
||||
return value == std::string("type=\"Struct\"");
|
||||
}
|
||||
|
||||
bool isArray(std::string& value)
|
||||
{
|
||||
return !value.compare(std::string("type=\"Seq\""))
|
||||
|| !value.compare(std::string("type=\"Bag\""))
|
||||
|| !value.compare(std::string("type=\"Alt\""))
|
||||
;
|
||||
return value == "type=\"Seq\"" || value == "type=\"Bag\"" || value == "type=\"Alt\"";
|
||||
}
|
||||
|
||||
#define STORE(node,key,value) \
|
||||
|
||||
Reference in New Issue
Block a user