updated API to take reference instead of pointer
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit

This commit is contained in:
Robin Müller 2022-03-01 17:52:39 +01:00
parent dae901a45e
commit b8bd211d8e
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
2 changed files with 4 additions and 4 deletions

View File

@ -19,7 +19,7 @@ ReturnValue_t NVMParameterBase::readJsonFile() {
ReturnValue_t NVMParameterBase::writeJsonFile() {
std::ofstream o(fullName);
o << std::setw(4) << json;
o << std::setw(4) << json << std::endl;
return HasReturnvaluesIF::RETURN_OK;
}

View File

@ -34,7 +34,7 @@ class NVMParameterBase : public HasReturnvaluesIF {
ReturnValue_t setValue(std::string key, T value);
template <typename T>
ReturnValue_t getValue(std::string key, T* value) const;
ReturnValue_t getValue(std::string key, T& value) const;
void printKeys() const;
void print() const;
@ -67,11 +67,11 @@ inline ReturnValue_t NVMParameterBase::setValue(std::string key, T value) {
}
template <typename T>
inline ReturnValue_t NVMParameterBase::getValue(std::string key, T* value) const {
inline ReturnValue_t NVMParameterBase::getValue(std::string key, T& value) const {
if (!json.contains(key)) {
return KEY_NOT_EXISTS;
}
*value = json[key];
value = json[key];
return RETURN_OK;
}