Removed implicit conversion in comparison operators (issue #998)

This commit is contained in:
Benoit Blanchon
2019-05-23 21:54:42 +02:00
parent 4eb8074358
commit 630107ae8a
14 changed files with 398 additions and 148 deletions

View File

@@ -23,6 +23,11 @@ class StlStringAdapter {
return false;
}
int8_t compare(const char* other) const {
if (!other) return 1;
return static_cast<int8_t>(_str->compare(other));
}
bool equals(const char* expected) const {
if (!expected) return false;
return *_str == expected;