MCPcopy Create free account
hub / github.com/TheRealMJP/SHforHLSL / AddSetting

Method AddSetting

SHTest/SampleFramework12/v1.04/Settings.cpp:940–958  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

938
939
940void SettingsContainer::AddSetting(Setting* setting)
941{
942 Assert_(initialized);
943 Assert_(setting != nullptr);
944 Assert_(FindSetting(setting->Name().c_str()) == nullptr);
945
946 for(uint64 groupIdx = 0; groupIdx < groups.Count(); ++groupIdx)
947 {
948 SettingsGroup& group = groups[groupIdx];
949 if(group.Name == setting->Group())
950 {
951 group.Settings.Add(setting);
952 return;
953 }
954 }
955
956 AssertFail_("Tried to add setting '%s' to non-existent group '%s'",
957 setting->Name().c_str(), setting->Group().c_str());
958}
959
960}

Callers 1

InitializeFunction · 0.80

Calls 3

c_strMethod · 0.80
CountMethod · 0.80
AddMethod · 0.45

Tested by

no test coverage detected