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

Method registerAssetBytes

valdi/src/valdi/runtime/Resources/AssetBytesStore.cpp:17–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15}
16
17StringBox AssetBytesStore::registerAssetBytes(const BytesView& bytes) {
18 std::lock_guard<Mutex> lock(_mutex);
19 auto id = ++_assetKeyBytesIdSequence;
20
21 auto url = STRING_FORMAT("{}{}", getAssetBytesStoreUrlPrefix(), id);
22 _bytesByUrl[url] = bytes;
23 return url;
24}
25
26void AssetBytesStore::unregisterAssetBytes(const StringBox& url) {
27 std::lock_guard<Mutex> lock(_mutex);

Callers 1

createAssetWithBytesMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected