Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/core/StarDirectives.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/core/StarDirectives.cpp')
-rw-r--r--source/core/StarDirectives.cpp23
1 files changed, 14 insertions, 9 deletions
diff --git a/source/core/StarDirectives.cpp b/source/core/StarDirectives.cpp
index 766b4d9..e486ea9 100644
--- a/source/core/StarDirectives.cpp
+++ b/source/core/StarDirectives.cpp
@@ -5,6 +5,11 @@
namespace Star {
+Directives::Entry::Entry(ImageOperation&& newOperation, String&& newString) {
+ operation = move(newOperation);
+ string = move(newString);
+}
+
Directives::Directives() {}
Directives::Directives(String const& directives) {
parse(directives);
@@ -60,14 +65,6 @@ inline bool DirectivesGroup::compare(DirectivesGroup const& other) const {
return hash() == other.hash();
}
-inline bool DirectivesGroup::operator==(DirectivesGroup const& other) const {
- return compare(other);
-}
-
-inline bool DirectivesGroup::operator!=(DirectivesGroup const& other) const {
- return !compare(other);
-}
-
void DirectivesGroup::append(Directives const& directives) {
m_directives.push_back(directives);
m_count += m_directives.back().entries->size();
@@ -127,7 +124,15 @@ inline size_t DirectivesGroup::hash() const {
return hasher.digest();
}
-inline size_t hash<DirectivesGroup>::operator()(DirectivesGroup const& s) const {
+bool operator==(DirectivesGroup const& a, DirectivesGroup const& b) {
+ return a.compare(b);
+}
+
+bool operator!=(DirectivesGroup const& a, DirectivesGroup const& b) {
+ return !a.compare(b);
+}
+
+size_t hash<DirectivesGroup>::operator()(DirectivesGroup const& s) const {
return s.hash();
}