mirror of https://github.com/axmolengine/axmol.git
Merge pull request #14941 from mogemimi/add-const-to-equals
Mark equals() functions as const
This commit is contained in:
commit
bce913c46b
|
@ -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())
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue