New Defects reported by Coverity Scan for LibreOffice
scan-admin at coverity.com
scan-admin at coverity.com
Sun Jan 12 00:31:20 UTC 2025
Hi,
Please find the latest report on new defect(s) introduced to LibreOffice found with Coverity Scan.
3 new defect(s) introduced to LibreOffice found with Coverity Scan.
1 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan.
New defect(s) Reported-by: Coverity Scan
Showing 3 of 3 defect(s)
** CID 1638657: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
/comphelper/source/misc/lok.cxx: 345 in comphelper::LibreOfficeKit::setViewSetter(std::function<void (int)>)()
________________________________________________________________________________________________________
*** CID 1638657: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
/comphelper/source/misc/lok.cxx: 345 in comphelper::LibreOfficeKit::setViewSetter(std::function<void (int)>)()
339
340 return bRet;
341 }
342
343 void setViewSetter(std::function<void(int)> pViewSetter)
344 {
>>> CID 1638657: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
>>> "pViewSetter" is copied in a call to copy assignment "operator =", when it could be moved instead.
345 g_pViewSetter = pViewSetter;
346 }
347
348 void setView(int nView)
349 {
350 if (!g_pViewSetter)
** CID 1638656: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
/comphelper/source/misc/lok.cxx: 360 in comphelper::LibreOfficeKit::setViewGetter(std::function<int ()>)()
________________________________________________________________________________________________________
*** CID 1638656: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
/comphelper/source/misc/lok.cxx: 360 in comphelper::LibreOfficeKit::setViewGetter(std::function<int ()>)()
354
355 g_pViewSetter(nView);
356 }
357
358 void setViewGetter(std::function<int()> pViewGetter)
359 {
>>> CID 1638656: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
>>> "pViewGetter" is copied in a call to copy assignment "operator =", when it could be moved instead.
360 g_pViewGetter = pViewGetter;
361 }
362
363 int getView()
364 {
365 if (!g_pViewGetter)
** CID 1638655: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
/svgio/source/svgreader/svgsymbolnode.cxx: 203 in svgio::svgreader::SvgSymbolNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer &, bool) const()
________________________________________________________________________________________________________
*** CID 1638655: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
/svgio/source/svgreader/svgsymbolnode.cxx: 203 in svgio::svgreader::SvgSymbolNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer &, bool) const()
197
198 // prepare embedding in transformation
199 // create embedding group element with transformation
200 const drawinglayer::primitive2d::Primitive2DReference xRef(
201 new drawinglayer::primitive2d::TransformPrimitive2D(
202 aEmbeddingTransform,
>>> CID 1638655: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
>>> "aContent" is passed-by-value as parameter to "drawinglayer::primitive2d::TransformPrimitive2D::TransformPrimitive2D(basegfx::B2DHomMatrix, drawinglayer::primitive2d::Primitive2DContainer &&)" when it could be moved instead.
203 drawinglayer::primitive2d::Primitive2DContainer(aContent)));
204
205 // add embedded geometry to result
206 rTarget.push_back(xRef);
207 }
208
209 } // end of namespace svgio::svgreader
210
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://scan.coverity.com/projects/libreoffice?tab=overview
More information about the LibreOffice
mailing list