MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / operator()

Method operator()

extlibs/fmt/include/fmt/printf.h:156–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

154
155 template <typename T, FMT_ENABLE_IF(std::is_integral<T>::value)>
156 unsigned operator()(T value) {
157 auto width = static_cast<uint32_or_64_or_128_t<T>>(value);
158 if (internal::is_negative(value)) {
159 specs_.align = align::left;
160 width = 0 - width;
161 }
162 unsigned int_max = max_value<int>();
163 if (width > int_max) FMT_THROW(format_error("number is too big"));
164 return static_cast<unsigned>(width);
165 }
166
167 template <typename T, FMT_ENABLE_IF(!std::is_integral<T>::value)>
168 unsigned operator()(T) {

Callers

nothing calls this directly

Calls 2

is_negativeFunction · 0.85
format_errorFunction · 0.85

Tested by

no test coverage detected