mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 21:31:53 +00:00
COMMON: Use appropriate equals() in BaseString
Remove a useless creation of a BaseString object with a C string in comparison operators of this class, because there is a function equals() that accepts a C string in parameter.
This commit is contained in:
parent
f969365688
commit
4880fab063
@ -316,7 +316,7 @@ TEMPLATE bool BASESTRING::operator==(const BaseString &x) const {
|
||||
}
|
||||
|
||||
TEMPLATE bool BASESTRING::operator==(const value_type *x) const {
|
||||
return equals(BaseString(x));
|
||||
return equals(x);
|
||||
}
|
||||
|
||||
TEMPLATE bool BASESTRING::operator!=(const BaseString &x) const {
|
||||
@ -324,7 +324,7 @@ TEMPLATE bool BASESTRING::operator!=(const BaseString &x) const {
|
||||
}
|
||||
|
||||
TEMPLATE bool BASESTRING::operator!=(const value_type *x) const {
|
||||
return !equals(BaseString(x));
|
||||
return !equals(x);
|
||||
}
|
||||
|
||||
TEMPLATE int BASESTRING::compareTo(const BaseString &x) const {
|
||||
|
Loading…
Reference in New Issue
Block a user