MCPcopy Create free account
hub / github.com/Snapchat/Valdi / postprocessAsset

Function postprocessAsset

valdi/src/valdi/runtime/Attributes/AssetAttributes.cpp:135–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133 }
134
135 snap::valdi_core::AssetOutputType _assetOutputType;
136};
137
138static Result<Value> postprocessAsset(ViewNode& viewNode, const Value& value) {
139 if (value.isNullOrUndefined()) {
140 return value;
141 }
142
143 if (isLoadedAsset(value)) {
144 return value;
145 }
146
147 auto result = AssetResolver::resolve(viewNode, value);
148 if (!result) {
149 return result.moveError();
150 }
151 return Value(result.moveValue());
152}

Callers

nothing calls this directly

Calls 4

isLoadedAssetFunction · 0.85
resolveFunction · 0.50
ValueClass · 0.50
isNullOrUndefinedMethod · 0.45

Tested by

no test coverage detected