MCPcopy Create free account
hub / github.com/Phobos-developers/Phobos / IntValidCheck

Method IntValidCheck

src/Utilities/GeneralUtils.cpp:20–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18}
19
20void GeneralUtils::IntValidCheck(int* source, const char* section, const char* tag, int defaultValue, int min, int max)
21{
22 if (*source < min || *source>max)
23 {
24 Debug::Log("[Developer warning][%s]%s=%d is invalid! Reset to %d.\n", section, tag, *source, defaultValue);
25 *source = defaultValue;
26 }
27}
28
29void GeneralUtils::DoubleValidCheck(double* source, const char* section, const char* tag, double defaultValue, double min, double max)
30{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected