MCPcopy Create free account
hub / github.com/dcleblanc/SafeInt / Min

Function Min

SafeInt.hpp:6353–6357  ·  view source on GitHub ↗

Miscellaneous helper functions

Source from the content-addressed store, hash-verified

6351
6352 // Miscellaneous helper functions
6353 SafeInt< T, E > Min( SafeInt< T, E > test, const T floor = std::numeric_limits<T>::min() ) const SAFEINT_NOTHROW
6354 {
6355 T tmp = test < m_int ? (T)test : m_int;
6356 return tmp < floor ? floor : tmp;
6357 }
6358
6359 SafeInt< T, E > Max( SafeInt< T, E > test, const T upper = std::numeric_limits<T>::max() ) const SAFEINT_NOTHROW
6360 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected