mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-05-28 15:14:11 +02:00
Change the type of the return value to a const reference
This commit is contained in:
parent
e00b299fe0
commit
7eb3d2aa59
@ -31,7 +31,7 @@ public:
|
||||
my_class(std::string const& name, int age):name_(name), age_(age) {}
|
||||
|
||||
// my_class should provide getters for the data members you want to pack.
|
||||
std::string get_name() const { return name_; }
|
||||
std::string const& get_name() const { return name_; }
|
||||
int get_age() const { return age_; }
|
||||
|
||||
friend bool operator==(my_class const& lhs, my_class const& rhs) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user