Skip to content

Commit

Permalink
Review suggestions
Browse files Browse the repository at this point in the history
Signed-off-by: Anton Korobeynikov <[email protected]>
  • Loading branch information
asl committed Nov 6, 2024
1 parent aa0d7d0 commit 4e49635
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ir/id.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ struct ID : Util::IHasSourceInfo, public IHasDbPrint {
bool operator!=(const char *a) const { return name != a; }
/// Defer to cstring's notion of less, which is a lexicographical and not a pointer comparison.
bool operator<(const char *a) const { return name < a; }
explicit operator bool() const { return name.c_str(); }
explicit operator bool() const { return name.c_str() != nullptr; }
operator cstring() const { return name; }
std::string string() const { return name.string(); }
std::string_view string_view() const { return name.string_view(); }
Expand Down

0 comments on commit 4e49635

Please sign in to comment.