MCPcopy Create free account
hub / github.com/audacity/audacity / CheckInteger

Function CheckInteger

libraries/lib-xml/XMLAttributeValueView.cpp:288–300  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

286
287template <typename ResultType>
288bool CheckInteger(ResultType& output, int64_t value) noexcept
289{
290 constexpr int64_t minValue = std::numeric_limits<ResultType>::min();
291 constexpr int64_t maxValue = std::numeric_limits<ResultType>::max();
292
293 if (minValue <= value && value <= maxValue)
294 {
295 output = static_cast<ResultType>(value);
296 return true;
297 }
298
299 return false;
300}
301
302template <typename ResultType>
303bool CheckInteger(ResultType& output, uint64_t value) noexcept

Callers 1

TryGetIntegerMethod · 0.85

Calls 2

maxFunction · 0.85
minFunction · 0.50

Tested by

no test coverage detected