summaryrefslogtreecommitdiff
path: root/include/xmloff
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2020-12-16 17:08:50 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-12-17 09:45:38 +0100
commita66163657c0f069e1da2944cf376d61a77696787 (patch)
treec52e0761b5c39a8651dddfb0b7d6c225b54c3f60 /include/xmloff
parent6e1cbf1cfa047007d048a70c6bf3abe67866f65d (diff)
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@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/xmloff')
-rw-r--r--include/xmloff/xmluconv.hxx3
1 files changed, 3 insertions, 0 deletions
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 );
};