1
0
mirror of synced 2026-02-14 12:14:03 +00:00

Merge pull request #2084 from rswarbrick/c_str

Use c_str(), not str() for IdString/std::string == and != operators
This commit is contained in:
whitequark
2020-05-28 09:40:35 +00:00
committed by GitHub

View File

@@ -296,8 +296,8 @@ namespace RTLIL
// The methods below are just convenience functions for better compatibility with std::string.
bool operator==(const std::string &rhs) const { return str() == rhs; }
bool operator!=(const std::string &rhs) const { return str() != rhs; }
bool operator==(const std::string &rhs) const { return c_str() == rhs; }
bool operator!=(const std::string &rhs) const { return c_str() != rhs; }
bool operator==(const char *rhs) const { return strcmp(c_str(), rhs) == 0; }
bool operator!=(const char *rhs) const { return strcmp(c_str(), rhs) != 0; }