aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rtlil.h
diff options
context:
space:
mode:
authorwhitequark <whitequark@whitequark.org>2020-05-28 09:40:35 +0000
committerGitHub <noreply@github.com>2020-05-28 09:40:35 +0000
commit5b62dbb0af0400146c9fc625d8b37554d04e81fc (patch)
tree6ab7f1e85c92eb3152bb44e664a1e967f092f2f2 /kernel/rtlil.h
parentb6513521931ab7375f5409db7d94140b533b5fa2 (diff)
parent8f87ccec9b6ed3c9bb8280830b506b28324a60d8 (diff)
downloadyosys-5b62dbb0af0400146c9fc625d8b37554d04e81fc.tar.gz
yosys-5b62dbb0af0400146c9fc625d8b37554d04e81fc.tar.bz2
yosys-5b62dbb0af0400146c9fc625d8b37554d04e81fc.zip
Merge pull request #2084 from rswarbrick/c_str
Use c_str(), not str() for IdString/std::string == and != operators
Diffstat (limited to 'kernel/rtlil.h')
-rw-r--r--kernel/rtlil.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/rtlil.h b/kernel/rtlil.h
index 11c45bbec..10bfc13f2 100644
--- a/kernel/rtlil.h
+++ b/kernel/rtlil.h
@@ -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; }