Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cpp_utils/include/cpp_utils/ReturnCode.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ class ReturnCode

protected:

//! Link every ReturnCode available with a string to deserialize
static const std::map<ReturnCode, std::string> to_string_conversion_;
//! Link every ReturnCodeValue available with a string to deserialize
static const std::map<ReturnCodeValue, std::string> to_string_conversion_;

//! \c ReturnCode value
std::uint32_t value_;
Expand Down
4 changes: 2 additions & 2 deletions cpp_utils/src/cpp/ReturnCode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ bool ReturnCode::operator !() const noexcept
return value_ != ReturnCode::RETCODE_OK;
}

const std::map<ReturnCode, std::string> ReturnCode::to_string_conversion_ =
const std::map<ReturnCode::ReturnCodeValue, std::string> ReturnCode::to_string_conversion_ =
{
{ReturnCode::RETCODE_OK, "Ok"},
{ReturnCode::RETCODE_ERROR, "Error"},
Expand All @@ -103,7 +103,7 @@ std::ostream& operator <<(
std::ostream& os,
const ReturnCode& code)
{
auto it = ReturnCode::to_string_conversion_.find(code);
auto it = ReturnCode::to_string_conversion_.find(static_cast<ReturnCode::ReturnCodeValue>((code())));
assert(it != ReturnCode::to_string_conversion_.end());
os << "{" << it->second << "}";
return os;
Expand Down