MCPcopy Create free account
hub / github.com/diasurgical/DevilutionX / NextLENarrow

Method NextLENarrow

Source/loadsave.cpp:156–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

154
155 template <class TSource, class TDesired>
156 TDesired NextLENarrow(TSource modifier = 0)
157 {
158 static_assert(sizeof(TSource) > sizeof(TDesired), "Can only narrow to a smaller type");
159 TSource value = SwapLE(Next<TSource>()) + modifier;
160 return static_cast<TDesired>(clamp<TSource>(value, std::numeric_limits<TDesired>::min(), std::numeric_limits<TDesired>::max()));
161 }
162
163 bool NextBool8()
164 {

Callers

nothing calls this directly

Calls 1

SwapLEFunction · 0.70

Tested by

no test coverage detected