MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / applyExistingImage

Method applyExistingImage

source/core/StarDirectives.cpp:378–389  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

376}
377
378void DirectivesGroup::applyExistingImage(Image& image) const {
379 forEach([&](auto const& entry, Directives const& directives) {
380 ImageOperation const& operation = entry.loadOperation(*directives);
381 if (auto error = operation.ptr<ErrorImageOperation>())
382 if (auto string = error->cause.ptr<std::string>())
383 throw DirectivesException::format("ImageOperation parse error: {}", *string);
384 else
385 std::rethrow_exception(error->cause.get<std::exception_ptr>());
386 else
387 processImageOperation(operation, image);
388 });
389}
390
391size_t DirectivesGroup::hash() const {
392 XXHash3 hasher;

Callers

nothing calls this directly

Calls 2

processImageOperationFunction · 0.85
formatFunction · 0.70

Tested by

no test coverage detected