Methods must not contain get/set for trivial accessors. get_code() is
renamed to code() to follow this guideline.
Moreover, the method was not implemented. It is marked as noexcept and
the _error_code member is made `const` as there is no reason for it to
be mutated.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: If0fca5cc91c1cb72fff183ee6d29588ff4b5c030
const char *file_name,
const char *function_name,
unsigned int line_number);
- lttng_error_code get_code() const;
+
+ lttng_error_code code() const noexcept
+ {
+ return _error_code;
+ }
private:
- lttng_error_code _error_code;
+ const lttng_error_code _error_code;
};
} /* namespace ctl */