Do not use const references for nlohmann json objects.
This commit is contained in:
@@ -44,7 +44,7 @@
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
unsigned int AddressDecoder::getUnsignedAttrFromJson(const nlohmann::json &obj, const std::string &strName)
|
||||
unsigned int AddressDecoder::getUnsignedAttrFromJson(json &obj, const std::string &strName)
|
||||
{
|
||||
if (!obj[strName].empty())
|
||||
{
|
||||
@@ -65,7 +65,7 @@ unsigned int AddressDecoder::getUnsignedAttrFromJson(const nlohmann::json &obj,
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<unsigned> AddressDecoder::getAttrToVectorFromJson(const nlohmann::json &obj, const std::string &strName)
|
||||
std::vector<unsigned> AddressDecoder::getAttrToVectorFromJson(json &obj, const std::string &strName)
|
||||
{
|
||||
std::vector<unsigned> vParameter;
|
||||
if (!obj[strName].empty())
|
||||
|
||||
@@ -75,8 +75,8 @@ public:
|
||||
void print();
|
||||
|
||||
private:
|
||||
static std::vector<unsigned> getAttrToVectorFromJson(const nlohmann::json &obj, const std::string &strName);
|
||||
static unsigned int getUnsignedAttrFromJson(const nlohmann::json &obj, const std::string &strName);
|
||||
static std::vector<unsigned> getAttrToVectorFromJson(nlohmann::json &obj, const std::string &strName);
|
||||
static unsigned int getUnsignedAttrFromJson(nlohmann::json &obj, const std::string &strName);
|
||||
|
||||
unsigned banksPerGroup;
|
||||
unsigned bankgroupsPerRank;
|
||||
|
||||
Reference in New Issue
Block a user