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

Function embedCommonNumericalConfig

src/config.cpp:2366–2378  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2364#define MEMORY_CONFIG 1
2365
2366constexpr standardConfig embedCommonNumericalConfig(const char *name, const char *alias, unsigned flags, long long lower, long long upper, long long defaultValue, int memory, int (*is_valid)(long long, const char**), int (*update)(long long, long long, const char**)) {
2367 standardConfig conf = {
2368 embedCommonConfig(name, alias, flags)
2369 embedConfigInterface(numericConfigInit, numericConfigSet, numericConfigGet, numericConfigRewrite)
2370 };
2371 conf.data.numeric.is_memory = (memory);
2372 conf.data.numeric.lower_bound = (lower);
2373 conf.data.numeric.upper_bound = (upper);
2374 conf.data.numeric.default_value = (defaultValue);
2375 conf.data.numeric.is_valid_fn = (is_valid);
2376 conf.data.numeric.update_fn = (update);
2377 return conf;
2378}
2379
2380constexpr standardConfig createIntConfig(const char *name, const char *alias, unsigned flags, long long lower, long long upper, int &config_addr, long long defaultValue, int memory, int (*is_valid)(long long, const char**), int (*update)(long long, long long, const char**))
2381{

Callers 10

createIntConfigFunction · 0.85
createUIntConfigFunction · 0.85
createLongConfigFunction · 0.85
createULongConfigFunction · 0.85
createLongLongConfigFunction · 0.85
createULongLongConfigFunction · 0.85
createSizeTConfigFunction · 0.85
createSSizeTConfigFunction · 0.85
createTimeTConfigFunction · 0.85
createOffTConfigFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected