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

summaryrefslogtreecommitdiff
path: root/source/core/StarDirectives.cpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2023-06-25 18:12:54 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2023-06-25 18:12:54 +1000
commit7d205330dbf1c2fd44d9d58393ab46434ac8bb5e (patch)
treee73db06236120e2399f0b4863257477eec528295 /source/core/StarDirectives.cpp
parente2424b7dcf60d18b277b092eb7f2a947fff27415 (diff)
More directives optimization
Diffstat (limited to 'source/core/StarDirectives.cpp')
-rw-r--r--source/core/StarDirectives.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/source/core/StarDirectives.cpp b/source/core/StarDirectives.cpp
index 1245eae..5dd82cf 100644
--- a/source/core/StarDirectives.cpp
+++ b/source/core/StarDirectives.cpp
@@ -229,6 +229,10 @@ inline size_t DirectivesGroup::hash() const {
return hasher.digest();
}
+const List<Directives>& DirectivesGroup::list() const {
+ return m_directives;
+}
+
bool operator==(DirectivesGroup const& a, DirectivesGroup const& b) {
return a.compare(b);
}
@@ -237,6 +241,21 @@ bool operator!=(DirectivesGroup const& a, DirectivesGroup const& b) {
return !a.compare(b);
}
+DataStream& operator>>(DataStream& ds, DirectivesGroup& directivesGroup) {
+ String string;
+ ds.read(string);
+
+ directivesGroup = move(DirectivesGroup(move(string)));
+
+ return ds;
+}
+
+DataStream& operator<<(DataStream& ds, DirectivesGroup const& directivesGroup) {
+ ds.write(directivesGroup.toString());
+
+ return ds;
+}
+
size_t hash<DirectivesGroup>::operator()(DirectivesGroup const& s) const {
return s.hash();
}