[Libreoffice-commits] core.git: include/xmloff

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Thu Dec 17 08:46:14 UTC 2020


 include/xmloff/xmluconv.hxx |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit a66163657c0f069e1da2944cf376d61a77696787
Author:     Noel Grandin <noelgrandin at gmail.com>
AuthorDate: Wed Dec 16 17:08:50 2020 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Dec 17 09:45:38 2020 +0100

    prevent accidentally passing a temporary
    
    to a class that stores a & to the parameter.
    
    Change-Id: Ia1dcd01f6ff4f961b5ba55f0db5c4944e4da52e1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107849
    Tested-by: Noel Grandin <noel.grandin at collabora.co.uk>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/include/xmloff/xmluconv.hxx b/include/xmloff/xmluconv.hxx
index 06e047648832..40edab42cdfd 100644
--- a/include/xmloff/xmluconv.hxx
+++ b/include/xmloff/xmluconv.hxx
@@ -60,6 +60,9 @@ private:
 
 public:
     SvXMLTokenEnumerator( const OUString& rString, sal_Unicode cSeparator = u' ' );
+    /** just so no-one accidentally passes a temporary to this, and ends up with this class
+     * accessing the temporary after the temporary has been deleted. */
+    SvXMLTokenEnumerator( OUString&& , sal_Unicode cSeparator = u' ' ) = delete;
 
     bool getNextToken( OUString& rToken );
 };


More information about the Libreoffice-commits mailing list