MCPcopy Create free account
hub / github.com/ROCm/AMDMIGraphX / find_impl

Function find_impl

src/value.cpp:262–274  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

260
261template <class T>
262static T* find_impl(const std::shared_ptr<value_base_impl>& x, const std::string& key, T* end)
263{
264 auto* a = if_array_impl(x);
265 if(a == nullptr)
266 return end;
267 auto* lookup = x->if_object();
268 if(lookup == nullptr)
269 return end;
270 auto it = lookup->find(key);
271 if(it == lookup->end())
272 return end;
273 return std::addressof((*a)[it->second]);
274}
275
276value* value::find(const std::string& pkey) { return find_impl(x, pkey, this->end()); }
277

Callers 1

findMethod · 0.85

Calls 4

if_array_implFunction · 0.85
if_objectMethod · 0.45
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected