mirror of
https://github.com/wownero/wownero-cpp.git
synced 2026-10-17 15:21:30 +02:00
pass std::string("...") to addJsonMember()
This commit is contained in:
@@ -83,6 +83,8 @@ namespace monero_utils
|
||||
|
||||
/**
|
||||
* Add number, string, and boolean json members using template specialization.
|
||||
*
|
||||
* TODO: addJsonMember("key", "val", ...) treated as integer instead of string literal
|
||||
*/
|
||||
template <class T>
|
||||
void addJsonMember(std::string key, T val, rapidjson::Document::AllocatorType& allocator, rapidjson::Value& root, rapidjson::Value& field) {
|
||||
|
||||
@@ -1285,7 +1285,7 @@ namespace monero {
|
||||
|
||||
// set string values
|
||||
rapidjson::Value value_str(rapidjson::kStringType);
|
||||
monero_utils::addJsonMember("signatureType", m_signature_type == monero_message_signature_type::SIGN_WITH_SPEND_KEY ? "spend" : "view", allocator, root, value_str);
|
||||
monero_utils::addJsonMember("signatureType", m_signature_type == monero_message_signature_type::SIGN_WITH_SPEND_KEY ? std::string("spend") : std::string("view"), allocator, root, value_str);
|
||||
|
||||
// return root
|
||||
return root;
|
||||
|
||||
Reference in New Issue
Block a user