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

Method DoubleValidCheck

src/Utilities/GeneralUtils.cpp:29–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27}
28
29void GeneralUtils::DoubleValidCheck(double* source, const char* section, const char* tag, double defaultValue, double min, double max)
30{
31 if (*source < min || *source>max)
32 {
33 Debug::Log("[Developer warning][%s]%s=%f is invalid! Reset to %f.\n", section, tag, *source, defaultValue);
34 *source = defaultValue;
35 }
36}
37
38const wchar_t* GeneralUtils::LoadStringOrDefault(const char* key, const wchar_t* defaultValue)
39{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected