[Libreoffice-commits] core.git: configmgr/source connectivity/source slideshow/source svx/source sw/source writerfilter/source xmloff/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Tue Nov 12 13:01:07 UTC 2019
configmgr/source/xcsparser.cxx | 2 -
connectivity/source/commontools/RowFunctionParser.cxx | 6 ++---
slideshow/source/engine/eventqueue.cxx | 4 +--
slideshow/source/engine/smilfunctionparser.cxx | 6 ++---
svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx | 12 +++++-----
sw/source/core/view/viewsh.cxx | 2 -
writerfilter/source/dmapper/DomainMapper_Impl.cxx | 2 -
xmloff/source/core/xmlimp.cxx | 2 -
8 files changed, 18 insertions(+), 18 deletions(-)
New commits:
commit 1a2926a995fdbdcdae0ca6407877084f3520e539
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Tue Nov 12 12:44:32 2019 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Nov 12 13:59:50 2019 +0100
use std::move when popping stuff off stacks
Change-Id: I6ba0ee8afee1a9579045643cd0118cf19599d5b9
Reviewed-on: https://gerrit.libreoffice.org/82497
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/configmgr/source/xcsparser.cxx b/configmgr/source/xcsparser.cxx
index c0b34974157b..7b1750b20972 100644
--- a/configmgr/source/xcsparser.cxx
+++ b/configmgr/source/xcsparser.cxx
@@ -257,7 +257,7 @@ void XcsParser::endElement(xmlreader::XmlReader const & reader) {
if (ignoring_ > 0) {
--ignoring_;
} else if (!elements_.empty()) {
- Element top(elements_.top());
+ Element top(std::move(elements_.top()));
elements_.pop();
if (top.node.is()) {
if (elements_.empty()) {
diff --git a/connectivity/source/commontools/RowFunctionParser.cxx b/connectivity/source/commontools/RowFunctionParser.cxx
index 811e0fb7c70f..44bd04a080dd 100644
--- a/connectivity/source/commontools/RowFunctionParser.cxx
+++ b/connectivity/source/commontools/RowFunctionParser.cxx
@@ -206,9 +206,9 @@ public:
throw ParseError( "Not enough arguments for binary operator" );
// retrieve arguments
- std::shared_ptr<ExpressionNode> pSecondArg( rNodeStack.top() );
+ std::shared_ptr<ExpressionNode> pSecondArg( std::move(rNodeStack.top()) );
rNodeStack.pop();
- std::shared_ptr<ExpressionNode> pFirstArg( rNodeStack.top() );
+ std::shared_ptr<ExpressionNode> pFirstArg( std::move(rNodeStack.top()) );
rNodeStack.pop();
// create combined ExpressionNode
@@ -257,7 +257,7 @@ public:
throw ParseError( "Not enough arguments for unary operator" );
// retrieve arguments
- std::shared_ptr<ExpressionNode> pArg( rNodeStack.top() );
+ std::shared_ptr<ExpressionNode> pArg( std::move(rNodeStack.top()) );
rNodeStack.pop();
rNodeStack.push( std::shared_ptr<ExpressionNode>( new UnaryFunctionExpression( pArg ) ) );
diff --git a/slideshow/source/engine/eventqueue.cxx b/slideshow/source/engine/eventqueue.cxx
index d5596cdb7036..e2b909e40185 100644
--- a/slideshow/source/engine/eventqueue.cxx
+++ b/slideshow/source/engine/eventqueue.cxx
@@ -180,7 +180,7 @@ namespace slideshow
&& !bFireAllEvents
&& (maEvents.empty() || maEvents.top().nTime > nCurrTime))
{
- const EventEntry aEvent (maNextNextEvents.top());
+ const EventEntry aEvent (std::move(maNextNextEvents.top()));
maNextNextEvents.pop();
maEvents.push(aEvent);
}
@@ -192,7 +192,7 @@ namespace slideshow
while( !maEvents.empty() &&
(bFireAllEvents || maEvents.top().nTime <= nCurrTime) )
{
- EventEntry event( maEvents.top() );
+ EventEntry event( std::move(maEvents.top()) );
maEvents.pop();
// only process event, if it is still 'charged',
diff --git a/slideshow/source/engine/smilfunctionparser.cxx b/slideshow/source/engine/smilfunctionparser.cxx
index 678e3c5ed740..9a6673e7db2a 100644
--- a/slideshow/source/engine/smilfunctionparser.cxx
+++ b/slideshow/source/engine/smilfunctionparser.cxx
@@ -238,7 +238,7 @@ namespace slideshow
throw ParseError( "Not enough arguments for unary operator" );
// retrieve arguments
- std::shared_ptr<ExpressionNode> pArg( rNodeStack.top() );
+ std::shared_ptr<ExpressionNode> pArg( std::move(rNodeStack.top()) );
rNodeStack.pop();
// check for constness
@@ -313,9 +313,9 @@ namespace slideshow
throw ParseError( "Not enough arguments for binary operator" );
// retrieve arguments
- std::shared_ptr<ExpressionNode> pSecondArg( rNodeStack.top() );
+ std::shared_ptr<ExpressionNode> pSecondArg( std::move(rNodeStack.top()) );
rNodeStack.pop();
- std::shared_ptr<ExpressionNode> pFirstArg( rNodeStack.top() );
+ std::shared_ptr<ExpressionNode> pFirstArg( std::move(rNodeStack.top()) );
rNodeStack.pop();
// create combined ExpressionNode
diff --git a/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx b/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx
index c5c17c289e7f..f1550728151f 100644
--- a/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx
@@ -822,7 +822,7 @@ public:
throw ParseError( "Not enough arguments for unary operator" );
// retrieve arguments
- std::shared_ptr<ExpressionNode> pArg( rNodeStack.top() );
+ std::shared_ptr<ExpressionNode> pArg( std::move(rNodeStack.top()) );
rNodeStack.pop();
if( pArg->isConstant() ) // check for constness
@@ -860,9 +860,9 @@ public:
throw ParseError( "Not enough arguments for binary operator" );
// retrieve arguments
- std::shared_ptr<ExpressionNode> pSecondArg( rNodeStack.top() );
+ std::shared_ptr<ExpressionNode> pSecondArg( std::move(rNodeStack.top()) );
rNodeStack.pop();
- std::shared_ptr<ExpressionNode> pFirstArg( rNodeStack.top() );
+ std::shared_ptr<ExpressionNode> pFirstArg( std::move(rNodeStack.top()) );
rNodeStack.pop();
// create combined ExpressionNode
@@ -893,11 +893,11 @@ public:
throw ParseError( "Not enough arguments for ternary operator" );
// retrieve arguments
- std::shared_ptr<ExpressionNode> pThirdArg( rNodeStack.top() );
+ std::shared_ptr<ExpressionNode> pThirdArg( std::move(rNodeStack.top()) );
rNodeStack.pop();
- std::shared_ptr<ExpressionNode> pSecondArg( rNodeStack.top() );
+ std::shared_ptr<ExpressionNode> pSecondArg( std::move(rNodeStack.top()) );
rNodeStack.pop();
- std::shared_ptr<ExpressionNode> pFirstArg( rNodeStack.top() );
+ std::shared_ptr<ExpressionNode> pFirstArg( std::move(rNodeStack.top()) );
rNodeStack.pop();
// create combined ExpressionNode
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 90f49a0c42ed..6ce52e5e041c 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -225,7 +225,7 @@ void SwViewShell::DLPostPaint2(bool bPaintFormLayer)
if( mPrePostPaintRegions.size() > 1 )
{
- vcl::Region current = mPrePostPaintRegions.top();
+ vcl::Region current = std::move(mPrePostPaintRegions.top());
mPrePostPaintRegions.pop();
if( current != mPrePostPaintRegions.top())
Imp()->GetDrawView()->UpdateDrawLayersRegion(mpPrePostOutDev, mPrePostPaintRegions.top());
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index be549f1a6965..0ba1c83673d1 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -2264,7 +2264,7 @@ void DomainMapper_Impl::PushFootOrEndnote( bool bIsFootnote )
xFootnoteText->createTextCursorByRange(xFootnoteText->getStart())));
// Redlines for the footnote anchor in the main text content
- std::vector< RedlineParamsPtr > aFootnoteRedline = m_aRedlines.top();
+ std::vector< RedlineParamsPtr > aFootnoteRedline = std::move(m_aRedlines.top());
m_aRedlines.pop();
CheckRedline( xFootnote->getAnchor( ) );
m_aRedlines.push( aFootnoteRedline );
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index 149421ee58d0..0b9c8eb2b8af 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -773,7 +773,7 @@ rName
{
// Get topmost context and remove it from the stack.
- SvXMLImportContextRef xContext = maContexts.top();
+ SvXMLImportContextRef xContext = std::move(maContexts.top());
maContexts.pop();
#ifdef DBG_UTIL
More information about the Libreoffice-commits
mailing list