MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-ValidationLayers / GetFromShared

Method GetFromShared

layers/sync/sync_op.h:76–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74 using const_iterator = Map::const_iterator;
75
76 SyncEventState *GetFromShared(const SyncEventState::EventPointer &event_state) {
77 const auto find_it = map_.find(event_state.get());
78 if (find_it == map_.end()) {
79 if (!event_state.get()) return nullptr;
80
81 const auto *event_plain_ptr = event_state.get();
82 auto sync_state = std::make_shared<SyncEventState>(event_state);
83 auto insert_pair = map_.emplace(event_plain_ptr, sync_state);
84 return insert_pair.first->second.get();
85 }
86 return find_it->second.get();
87 }
88
89 const SyncEventState* Get(const SyncEventState::EventPointer& event_state) const {
90 const auto find_it = map_.find(event_state.get());

Callers 3

ReplayRecordMethod · 0.80
DoRecordMethod · 0.80

Calls 3

findMethod · 0.45
endMethod · 0.45
emplaceMethod · 0.45

Tested by

no test coverage detected