diff --git a/src/value.cpp b/src/value.cpp index fc5da1d2e..3d0c40002 100644 --- a/src/value.cpp +++ b/src/value.cpp @@ -239,6 +239,21 @@ Value::toJson() const return val; } +uint64_t +unpackId(const Json::Value& json, const std::string& key) { + uint64_t ret = 0; + try { + const auto& t = json[key]; + if (t.isString()) { + ret = std::stoull(t.asString()); + } else { + ret = t.asLargestUInt(); + } + } catch (...) {} + return ret; +} +#endif + bool Value::checkSignature() { @@ -274,21 +289,6 @@ Value::decrypt(const crypto::PrivateKey& key) return decryptedValue; } -uint64_t -unpackId(const Json::Value& json, const std::string& key) { - uint64_t ret = 0; - try { - const auto& t = json[key]; - if (t.isString()) { - ret = std::stoull(t.asString()); - } else { - ret = t.asLargestUInt(); - } - } catch (...) {} - return ret; -} -#endif - bool FieldValue::operator==(const FieldValue& vfd) const {