From: Georg Baum Date: Sun, 8 Oct 2006 09:59:17 +0000 (+0000) Subject: Oops, I forgot to return a reference in operator+=. This patch fixes that. X-Git-Tag: 1.6.10~12432 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=3836ff77f0f4904b923395776ed217bcdeb72ff4;p=features.git Oops, I forgot to return a reference in operator+=. This patch fixes that. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15276 a592a061-630c-0410-9148-cb99ea01b6c8 --- 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