summaryrefslogtreecommitdiff
path: root/src/shared/cplusplus/Literals.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/cplusplus/Literals.cpp')
-rw-r--r--src/shared/cplusplus/Literals.cpp27
1 files changed, 13 insertions, 14 deletions
diff --git a/src/shared/cplusplus/Literals.cpp b/src/shared/cplusplus/Literals.cpp
index 40042eb66e..078c070270 100644
--- a/src/shared/cplusplus/Literals.cpp
+++ b/src/shared/cplusplus/Literals.cpp
@@ -72,6 +72,19 @@ Literal::Literal(const char *chars, unsigned size)
Literal::~Literal()
{ delete[] _chars; }
+bool Literal::isEqualTo(const Literal *other) const
+{
+ if (! other)
+ return false;
+ else if (this == other)
+ return true;
+ else if (hashCode() != other->hashCode())
+ return false;
+ else if (size() != other->size())
+ return false;
+ return ! strcmp(chars(), other->chars());
+}
+
Literal::iterator Literal::begin() const
{ return _chars; }
@@ -214,17 +227,3 @@ Identifier::Identifier(const char *chars, unsigned size)
Identifier::~Identifier()
{ }
-bool Identifier::isEqualTo(const Identifier *other) const
-{
- if (! other)
- return false;
- else if (this == other)
- return true;
- else if (hashCode() != other->hashCode())
- return false;
- else if (size() != other->size())
- return false;
- return ! strcmp(chars(), other->chars());
-}
-
-