From 123f7388b288aa02117064029e5ed39d75909fea Mon Sep 17 00:00:00 2001 From: Lukas Steiner Date: Wed, 16 Jun 2021 09:28:18 +0200 Subject: [PATCH] Do not use const references for nlohmann json objects. --- DRAMSys/library/src/simulation/AddressDecoder.cpp | 4 ++-- DRAMSys/library/src/simulation/AddressDecoder.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/DRAMSys/library/src/simulation/AddressDecoder.cpp b/DRAMSys/library/src/simulation/AddressDecoder.cpp index 5b03d0ff..1f2cf405 100644 --- a/DRAMSys/library/src/simulation/AddressDecoder.cpp +++ b/DRAMSys/library/src/simulation/AddressDecoder.cpp @@ -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 AddressDecoder::getAttrToVectorFromJson(const nlohmann::json &obj, const std::string &strName) +std::vector AddressDecoder::getAttrToVectorFromJson(json &obj, const std::string &strName) { std::vector vParameter; if (!obj[strName].empty()) diff --git a/DRAMSys/library/src/simulation/AddressDecoder.h b/DRAMSys/library/src/simulation/AddressDecoder.h index b05e6051..4065a96c 100644 --- a/DRAMSys/library/src/simulation/AddressDecoder.h +++ b/DRAMSys/library/src/simulation/AddressDecoder.h @@ -75,8 +75,8 @@ public: void print(); private: - static std::vector getAttrToVectorFromJson(const nlohmann::json &obj, const std::string &strName); - static unsigned int getUnsignedAttrFromJson(const nlohmann::json &obj, const std::string &strName); + static std::vector getAttrToVectorFromJson(nlohmann::json &obj, const std::string &strName); + static unsigned int getUnsignedAttrFromJson(nlohmann::json &obj, const std::string &strName); unsigned banksPerGroup; unsigned bankgroupsPerRank;