MCPcopy Create free account
hub / github.com/dobin/RedEdr / get_binary

Method get_binary

RedEdrShared/json.hpp:12039–12055  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12037 */
12038 template<typename NumberType>
12039 bool get_binary(const input_format_t format,
12040 const NumberType len,
12041 binary_t& result)
12042 {
12043 bool success = true;
12044 for (NumberType i = 0; i < len; i++)
12045 {
12046 get();
12047 if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(format, "binary")))
12048 {
12049 success = false;
12050 break;
12051 }
12052 result.push_back(static_cast<std::uint8_t>(current));
12053 }
12054 return success;
12055 }
12056
12057 /*!
12058 @param[in] format the current format (for diagnostics)

Callers 1

hashFunction · 0.80

Calls 1

getFunction · 0.85

Tested by

no test coverage detected