Skip to content

Commit

Permalink
properly return const ref from tofrom string wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
trapexit committed Sep 19, 2020
1 parent dbc4774 commit 610c75f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/tofrom_wrapper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ class ToFromWrapper : public ToFromString

public:
ToFromWrapper<T>&
operator=(const T data_)
operator=(const T &data_)
{
_data = data_;
return *this;
}

public:
operator T() const
operator const T&() const
{
return _data;
}
Expand All @@ -72,7 +72,7 @@ class ToFromWrapper : public ToFromString

public:
bool
operator==(const T data_) const
operator==(const T &data_) const
{
return (_data == data_);
}
Expand Down Expand Up @@ -121,7 +121,7 @@ class ROToFromWrapper : public ToFromString

public:
bool
operator==(const T data_) const
operator==(const T &data_) const
{
return (_data == data_);
}
Expand Down

0 comments on commit 610c75f

Please sign in to comment.