cid#1660247 Variable copied when it could be moved
and cid#1660246 Variable copied when it could be moved cid#1660243 Variable copied when it could be moved cid#1660240 Variable copied when it could be moved cid#1660237 Variable copied when it could be moved cid#1660235 Variable copied when it could be moved cid#1660234 Variable copied when it could be moved cid#1660230 Variable copied when it could be moved cid#1660228 Variable copied when it could be moved cid#1660225 Variable copied when it could be moved cid#1660223 Variable copied when it could be moved Change-Id: I3cd87174e8e88a9c55101a73399117c3f2b80644 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188926 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
This commit is contained in:
@@ -1078,12 +1078,12 @@ namespace basctl
|
||||
|
||||
for (auto const& doc : aDocuments)
|
||||
{
|
||||
const ScriptDocument aCheck( doc.xModel );
|
||||
ScriptDocument aCheck( doc.xModel );
|
||||
if ( _rUrlOrCaption == aCheck.getTitle()
|
||||
|| _rUrlOrCaption == aCheck.m_pImpl->getURL()
|
||||
)
|
||||
{
|
||||
aDocument = aCheck;
|
||||
aDocument = std::move(aCheck);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -135,8 +135,7 @@ const formula::IFunctionDescription* FunctionCategory::getFunction(sal_uInt32 _n
|
||||
if ( _nPos >= m_aFunctions.size() && _nPos < m_nFunctionCount )
|
||||
{
|
||||
uno::Reference< report::meta::XFunctionDescription> xFunctionDescription = m_xCategory->getFunction(_nPos);
|
||||
std::shared_ptr< FunctionDescription > pFunction = m_pFunctionManager->get(xFunctionDescription);
|
||||
m_aFunctions.push_back( pFunction );
|
||||
m_aFunctions.push_back(m_pFunctionManager->get(xFunctionDescription));
|
||||
}
|
||||
return m_aFunctions[_nPos].get();
|
||||
}
|
||||
|
||||
@@ -689,7 +689,7 @@ void ScDPGroupTableData::ModifyFilterCriteria(vector<ScDPFilteredCache::Criterio
|
||||
std::make_shared<ScDPGroupNumFilter>(std::move(aMatchValues), *pNumInfo);
|
||||
}
|
||||
|
||||
aNewCriteria.push_back(aCri);
|
||||
aNewCriteria.push_back(std::move(aCri));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -846,7 +846,7 @@ void PaneStyleContainer::ProcessPaneStyle(
|
||||
rReadContext.mxCanvas);
|
||||
}
|
||||
|
||||
mStyles.push_back(pStyle);
|
||||
mStyles.push_back(std::move(pStyle));
|
||||
}
|
||||
|
||||
SharedPaneStyle PaneStyleContainer::GetPaneStyle (const OUString& rsStyleName) const
|
||||
|
||||
@@ -1826,7 +1826,7 @@ void MSWordExportBase::WriteSpecialText( SwNodeOffset nStart, SwNodeOffset nEnd,
|
||||
{
|
||||
sal_uInt8 nOldTyp = m_nTextTyp;
|
||||
m_nTextTyp = nTTyp;
|
||||
auto const pOldPam = m_pCurPam; //!! Simply shifting the PaM without restoring should do the job too
|
||||
auto pOldPam = m_pCurPam; //!! Simply shifting the PaM without restoring should do the job too
|
||||
SwNodeOffset nOldStart = m_nCurStart;
|
||||
SwNodeOffset nOldEnd = m_nCurEnd;
|
||||
SwPaM* pOldEnd = m_pOrigPam;
|
||||
@@ -1852,7 +1852,7 @@ void MSWordExportBase::WriteSpecialText( SwNodeOffset nStart, SwNodeOffset nEnd,
|
||||
m_pTableInfo = std::move(xOldTableInfo);
|
||||
|
||||
m_bOutPageDescs = bOldPageDescs;
|
||||
m_pCurPam = pOldPam; // delete Pam
|
||||
m_pCurPam = std::move(pOldPam); // delete Pam
|
||||
m_nCurStart = nOldStart;
|
||||
m_nCurEnd = nOldEnd;
|
||||
m_pOrigPam = pOldEnd;
|
||||
|
||||
@@ -503,7 +503,7 @@ Found findEntity(
|
||||
}
|
||||
break;
|
||||
}
|
||||
args.push_back(argType);
|
||||
args.push_back(std::move(argType));
|
||||
}
|
||||
i = j;
|
||||
} while (i != typeNucleus.getLength()
|
||||
|
||||
@@ -1382,7 +1382,7 @@ librdf_Repository::querySelect(const OUString & i_rQuery)
|
||||
std::scoped_lock g(m_aMutex);
|
||||
const OString query(
|
||||
OUStringToOString(i_rQuery, RTL_TEXTENCODING_UTF8) );
|
||||
const std::shared_ptr<librdf_query> pQuery(
|
||||
std::shared_ptr<librdf_query> pQuery(
|
||||
librdf_new_query(m_pWorld.get(), s_sparql, nullptr,
|
||||
reinterpret_cast<const unsigned char*> (query.getStr()), nullptr),
|
||||
safe_librdf_free_query);
|
||||
@@ -1391,7 +1391,7 @@ librdf_Repository::querySelect(const OUString & i_rQuery)
|
||||
u"librdf_Repository::querySelect: "
|
||||
"librdf_new_query failed"_ustr, *this);
|
||||
}
|
||||
const std::shared_ptr<librdf_query_results> pResults(
|
||||
std::shared_ptr<librdf_query_results> pResults(
|
||||
librdf_model_query_execute(m_pModel.get(), pQuery.get()),
|
||||
safe_librdf_free_query_results);
|
||||
if (!pResults || !librdf_query_results_is_bindings(pResults.get())) {
|
||||
@@ -1420,7 +1420,7 @@ librdf_Repository::querySelect(const OUString & i_rQuery)
|
||||
}
|
||||
|
||||
return new librdf_QuerySelectResult(this, m_aMutex,
|
||||
pQuery, pResults, names);
|
||||
std::move(pQuery), std::move(pResults), names);
|
||||
}
|
||||
|
||||
uno::Reference< container::XEnumeration > SAL_CALL
|
||||
|
||||
@@ -460,13 +460,13 @@ void Parser::handleList(xmlreader::XmlReader& rReader)
|
||||
{
|
||||
DriverInfo aDriver;
|
||||
handleEntry(aDriver, rReader);
|
||||
mrDriverList.push_back(aDriver);
|
||||
mrDriverList.push_back(std::move(aDriver));
|
||||
}
|
||||
else if (name == "entryRange")
|
||||
{
|
||||
DriverInfo aDriver;
|
||||
handleEntry(aDriver, rReader);
|
||||
mrDriverList.push_back(aDriver);
|
||||
mrDriverList.push_back(std::move(aDriver));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -492,9 +492,8 @@ struct NewDonutSeries
|
||||
{
|
||||
::std::vector< DataRowPointStyle > aRet;
|
||||
|
||||
DataRowPointStyle aSeriesStyle( DataRowPointStyle::DATA_SERIES
|
||||
, m_xSeries, -1, 1, msStyleName, mnAttachedAxis );
|
||||
aRet.push_back( aSeriesStyle );
|
||||
aRet.emplace_back(DataRowPointStyle::DATA_SERIES
|
||||
, m_xSeries, -1, 1, msStyleName, mnAttachedAxis);
|
||||
|
||||
sal_Int32 nPointIndex=0;
|
||||
for (auto const& pointStyle : m_aPointStyles)
|
||||
|
||||
@@ -609,7 +609,7 @@ void SchXMLTableCellContext::startFastElement (sal_Int32 /*nElement*/,
|
||||
mbReadText = false;
|
||||
}
|
||||
|
||||
mrTable.aData[ mrTable.nRowIndex ].push_back( aCell );
|
||||
mrTable.aData[ mrTable.nRowIndex ].push_back(std::move(aCell));
|
||||
mrTable.nColumnIndex++;
|
||||
if( mrTable.nMaxColumnIndex < mrTable.nColumnIndex )
|
||||
mrTable.nMaxColumnIndex = mrTable.nColumnIndex;
|
||||
|
||||
@@ -111,7 +111,7 @@ namespace xmloff::metadata
|
||||
PropertyDescriptionList singleElementList;
|
||||
singleElementList.push_back( desc );
|
||||
|
||||
s_attributesWithoutGroup[ desc->attribute ].push_back( singleElementList );
|
||||
s_attributesWithoutGroup[ desc->attribute ].push_back(std::move(singleElementList));
|
||||
++desc;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user