MCPcopy Create free account
hub / github.com/LunarG/VulkanTools / FindByKey

Function FindByKey

vkconfig_gui/widget_setting_flags.cpp:33–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31
32template <typename T>
33static const T* FindByKey(const std::vector<T>& container, const char* key) {
34 assert(key != nullptr);
35 assert(std::strcmp(key, "") != 0);
36
37 for (std::size_t i = 0, n = container.size(); i < n; ++i) {
38 if (container[i].key == key) return &container[i];
39 }
40
41 return nullptr;
42}
43
44WidgetSettingFlag::WidgetSettingFlag(QTreeWidget* tree, QTreeWidgetItem* item, const SettingMetaFlags& meta,
45 SettingDataSet& data_set, const std::string& flag)

Callers 1

WidgetSettingFlagMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected