mirror of
https://github.com/xoseperez/espurna.git
synced 2026-03-12 03:07:13 +01:00
system: fix view comparison
note that it is equality, not byte comparison based on memcmp or strcmp return values
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
namespace espurna {
|
||||
|
||||
// no special cases for flash strings
|
||||
bool StringView::compare(espurna::StringView other) const {
|
||||
bool StringView::equals(espurna::StringView other) const {
|
||||
return _ptr == other._ptr
|
||||
|| (_len == other._len && (0 == __builtin_memcmp(_ptr, other._ptr, _len)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user