include/xmloff/xmluconv.hxx | 3 +++
1 file changed, 3 insertions(+)
New commits:
commit a66163657c0f069e1da2944cf376d61a77696787
Author: Noel Grandin <[email protected]>
AuthorDate: Wed Dec 16 17:08:50 2020 +0200
Commit: Noel Grandin <[email protected]>
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 <[email protected]>
Reviewed-by: Noel Grandin <[email protected]>
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 );
};
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits