| 89 | // Fix user-supplied options to be reasonable |
| 90 | template <class T, class V> |
| 91 | static 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 | } |
| 95 | Options SanitizeOptions(const std::string& dbname, |
| 96 | const InternalKeyComparator* icmp, |
| 97 | const InternalFilterPolicy* ipolicy, |