Merge pull request #14941 from mogemimi/add-const-to-equals

Mark equals() functions as const
This commit is contained in:
zilongshanren 2016-01-22 09:32:41 +08:00
commit bce913c46b
2 changed files with 3 additions and 3 deletions

View File

@ -300,7 +300,7 @@ public:
* @param other The vector to be compared. * @param other The vector to be compared.
* @return True if two vectors are equal, false if not. * @return True if two vectors are equal, false if not.
*/ */
bool equals(const Vector<T> &other) bool equals(const Vector<T> &other) const
{ {
ssize_t s = this->size(); ssize_t s = this->size();
if (s != other.size()) if (s != other.size())

View File

@ -63,7 +63,7 @@ struct CC_DLL Color3B
bool operator!=(const Color4B& right) const; bool operator!=(const Color4B& right) const;
bool operator!=(const Color4F& right) const; bool operator!=(const Color4F& right) const;
bool equals(const Color3B& other) bool equals(const Color3B& other) const
{ {
return (*this == other); return (*this == other);
} }
@ -144,7 +144,7 @@ struct CC_DLL Color4F
bool operator!=(const Color3B& right) const; bool operator!=(const Color3B& right) const;
bool operator!=(const Color4B& right) const; bool operator!=(const Color4B& right) const;
bool equals(const Color4F &other) bool equals(const Color4F &other) const
{ {
return (*this == other); return (*this == other);
} }