MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / createEnumConfig

Function createEnumConfig

src/config.cpp:2208–2222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2206}
2207
2208constexpr standardConfig createEnumConfig(const char *name, const char *alias, unsigned flags, configEnum *enumVal, int &config_addr, int defaultValue, int (*is_valid)(int,const char**), int (*update)(int,int,const char**)) {
2209 standardConfig c = {
2210 embedCommonConfig(name, alias, flags)
2211 embedConfigInterface(enumConfigInit, enumConfigSet, enumConfigGet, enumConfigRewrite)
2212 };
2213 c.data.enumd = {
2214 &(config_addr),
2215 (enumVal),
2216 (defaultValue),
2217 (is_valid),
2218 (update),
2219 };
2220
2221 return c;
2222}
2223
2224/* Gets a 'long long val' and sets it into the union, using a macro to get
2225 * compile time type check. */

Callers 1

config.cppFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected