[Scummvm-git-logs] scummvm master -> 4880fab063002271cb1b9c8810775e21852b5e14
criezy
criezy at scummvm.org
Fri Nov 6 21:21:11 UTC 2020
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
4880fab063 COMMON: Use appropriate equals() in BaseString
Commit: 4880fab063002271cb1b9c8810775e21852b5e14
https://github.com/scummvm/scummvm/commit/4880fab063002271cb1b9c8810775e21852b5e14
Author: Mathias Parnaudeau (mparnaudeau at optimum-software.fr)
Date: 2020-11-06T21:21:05Z
Commit Message:
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.
Changed paths:
common/base-str.cpp
diff --git a/common/base-str.cpp b/common/base-str.cpp
index 2cb493144d..b0bad0b518 100644
--- a/common/base-str.cpp
+++ b/common/base-str.cpp
@@ -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 {
More information about the Scummvm-git-logs
mailing list