MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / get_binary

Method get_binary

Source/Utils/json.hpp:9998–10014  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9996 */
9997 template<typename NumberType>
9998 bool get_binary(const input_format_t format,
9999 const NumberType len,
10000 binary_t& result)
10001 {
10002 bool success = true;
10003 for (NumberType i = 0; i < len; i++)
10004 {
10005 get();
10006 if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(format, "binary")))
10007 {
10008 success = false;
10009 break;
10010 }
10011 result.push_back(static_cast<std::uint8_t>(current));
10012 }
10013 return success;
10014 }
10015
10016 /*!
10017 @param[in] format the current format (for diagnostics)

Callers 1

hashFunction · 0.80

Calls 2

getFunction · 0.85
push_backMethod · 0.45

Tested by

no test coverage detected