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

summaryrefslogtreecommitdiff
path: root/source/core/StarAssetPath.cpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2023-06-24 19:41:52 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2023-06-24 19:41:52 +1000
commit7bde128a87268751e1f46174a64ffd78b03bf8bc (patch)
treeb27dd239831fa803d019e35f08f209b1d9e091ea /source/core/StarAssetPath.cpp
parent51a9de3af37eb8a6844a2dd5f3f568f3956726db (diff)
DirectivesGroup prototype
Diffstat (limited to 'source/core/StarAssetPath.cpp')
-rw-r--r--source/core/StarAssetPath.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/source/core/StarAssetPath.cpp b/source/core/StarAssetPath.cpp
index 2100ee0..eb1cd4d 100644
--- a/source/core/StarAssetPath.cpp
+++ b/source/core/StarAssetPath.cpp
@@ -151,6 +151,18 @@ AssetPath::AssetPath(String const& path) {
*this = move(AssetPath::split(path)); // split code should probably be in here, but whatever
}
+AssetPath::AssetPath(String&& basePath, Maybe<String>&& subPath, DirectivesGroup&& directives) {
+ this->basePath = move(basePath);
+ this->subPath = move(subPath);
+ this->directives = move(directives);
+}
+
+AssetPath::AssetPath(String const& basePath, Maybe<String> const& subPath, DirectivesGroup const& directives) {
+ this->basePath = basePath;
+ this->subPath = subPath;
+ this->directives = directives;
+}
+
std::ostream& operator<<(std::ostream& os, AssetPath const& rhs) {
os << rhs.basePath;
if (rhs.subPath) {
@@ -158,9 +170,9 @@ std::ostream& operator<<(std::ostream& os, AssetPath const& rhs) {
os << *rhs.subPath;
}
- rhs.directives.forEach([&](ImageOperation const& operation, String const& string) {
+ rhs.directives.forEach([&](auto const& entry) {
os << "?";
- os << string;
+ os << entry.string;
});
return os;