diff --git a/src/support/docstring.C b/src/support/docstring.C index ceffbc3832..7fd34ed9a9 100644 --- a/src/support/docstring.C +++ b/src/support/docstring.C @@ -122,7 +122,7 @@ lyx::docstring operator+(char l, lyx::docstring const & r) } -lyx::docstring operator+=(lyx::docstring & l, char const * r) +lyx::docstring & operator+=(lyx::docstring & l, char const * r) { for (char const * c = r; *c; ++c) { BOOST_ASSERT(static_cast(*c) < 0x80); @@ -132,7 +132,7 @@ lyx::docstring operator+=(lyx::docstring & l, char const * r) } -lyx::docstring operator+=(lyx::docstring & l, char r) +lyx::docstring & operator+=(lyx::docstring & l, char r) { BOOST_ASSERT(static_cast(r) < 0x80); l.push_back(r); diff --git a/src/support/docstring.h b/src/support/docstring.h index 1cff5109a0..072e76155b 100644 --- a/src/support/docstring.h +++ b/src/support/docstring.h @@ -64,10 +64,10 @@ lyx::docstring operator+(lyx::docstring const & l, char r); lyx::docstring operator+(char l, lyx::docstring const & r); /// Append a C string of ASCII characters to a docstring -lyx::docstring operator+=(lyx::docstring &, char const *); +lyx::docstring & operator+=(lyx::docstring &, char const *); /// Append a single ASCII character to a docstring -lyx::docstring operator+=(lyx::docstring & l, char r); +lyx::docstring & operator+=(lyx::docstring & l, char r); #if SIZEOF_WCHAR_T != 4 && defined(__GNUC__) && defined(__GNUC_MINOR__) && __GNUC__ == 3 && __GNUC_MINOR__ < 4