From 5ec57560c0b497f9f48671dd200bb23d1f6eac35 Mon Sep 17 00:00:00 2001 From: Anton Kudryavtsev Date: Wed, 29 Mar 2017 07:10:46 +0300 Subject: Prefer rvalue versions of toLatin() and toUtf8() ... to re-use existing buffers. Change-Id: I7c42529b8cd4400520a59e658ab76f4f8e965cd4 Reviewed-by: Thiago Macieira --- src/xml/dom/qdom.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/xml/dom/qdom.cpp') diff --git a/src/xml/dom/qdom.cpp b/src/xml/dom/qdom.cpp index dd9bb4f875..9affd697a0 100644 --- a/src/xml/dom/qdom.cpp +++ b/src/xml/dom/qdom.cpp @@ -6442,7 +6442,7 @@ void QDomDocumentPrivate::saveDocument(QTextStream& s, const int indent, QDomNod if (enc.isEmpty()) enc = encoding.cap(5); if (!enc.isEmpty()) - codec = QTextCodec::codecForName(enc.toLatin1().data()); + codec = QTextCodec::codecForName(std::move(enc).toLatin1()); } if (!codec) codec = QTextCodec::codecForName("UTF-8"); -- cgit v1.2.3