MCPcopy Create free account
hub / github.com/ElementsProject/elements / ClipToRange

Function ClipToRange

src/leveldb/db/db_impl.cc:91–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89// Fix user-supplied options to be reasonable
90template <class T, class V>
91static void ClipToRange(T* ptr, V minvalue, V maxvalue) {
92 if (static_cast<V>(*ptr) > maxvalue) *ptr = maxvalue;
93 if (static_cast<V>(*ptr) < minvalue) *ptr = minvalue;
94}
95Options SanitizeOptions(const std::string& dbname,
96 const InternalKeyComparator* icmp,
97 const InternalFilterPolicy* ipolicy,

Callers 1

SanitizeOptionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected