Use list initialization (C++11) for maps/vectors instead of boost::assign::map_list_of/list_of

This commit is contained in:
practicalswift
2017-06-06 21:15:28 +02:00
parent 1b708f2cf3
commit 3fb81a8480
16 changed files with 108 additions and 124 deletions

View File

@@ -24,7 +24,6 @@
#include <stdio.h>
#include <boost/algorithm/string.hpp>
#include <boost/assign/list_of.hpp>
static bool fCreateBlank;
static std::map<std::string,UniValue> registers;
@@ -546,7 +545,11 @@ static void MutateTxSign(CMutableTransaction& tx, const std::string& flagStr)
if (!prevOut.isObject())
throw std::runtime_error("expected prevtxs internal object");
std::map<std::string,UniValue::VType> types = boost::assign::map_list_of("txid", UniValue::VSTR)("vout",UniValue::VNUM)("scriptPubKey",UniValue::VSTR);
std::map<std::string, UniValue::VType> types = {
{"txid", UniValue::VSTR},
{"vout", UniValue::VNUM},
{"scriptPubKey", UniValue::VSTR},
};
if (!prevOut.checkObject(types))
throw std::runtime_error("prevtxs internal object typecheck fail");