Add std::move as suggested by clang-tidy 23
diff --git a/fofi/FoFiType1.cc b/fofi/FoFiType1.cc index 746213b..2e97f8d 100644 --- a/fofi/FoFiType1.cc +++ b/fofi/FoFiType1.cc
@@ -259,6 +259,6 @@ pos2 += segLen; } file2.resize(pos2); - fileOwner = file2; + fileOwner = std::move(file2); file = fileOwner; }
diff --git a/poppler/DistinguishedNameParser.h b/poppler/DistinguishedNameParser.h index 7deb257..c5e88fe 100644 --- a/poppler/DistinguishedNameParser.h +++ b/poppler/DistinguishedNameParser.h
@@ -190,7 +190,7 @@ // we have reached end of string, but never an actual ", so error out return {}; } - dnPair.second = value; + dnPair.second = std::move(value); } else { std::string value; bool stop = false; @@ -256,7 +256,7 @@ } } if (lastAddedEscapedSpace) { - dnPair.second = value; + dnPair.second = std::move(value); } else { dnPair.second = std::string { removeTrailingSpaces(value) }; }
diff --git a/poppler/GfxState.cc b/poppler/GfxState.cc index 21e10ed..f928c52 100644 --- a/poppler/GfxState.cc +++ b/poppler/GfxState.cc
@@ -6813,7 +6813,7 @@ void GfxState::setLineDash(std::vector<double> &&dash, double start) { - lineDash = dash; + lineDash = std::move(dash); lineDashStart = start; }
diff --git a/qt5/src/poppler-page.cc b/qt5/src/poppler-page.cc index 8ff236f..6e7bfc6 100644 --- a/qt5/src/poppler-page.cc +++ b/qt5/src/poppler-page.cc
@@ -381,7 +381,7 @@ for (const std::unique_ptr<::LinkAction> &nextAction : a->nextActions()) { links << convertLinkActionToLink(nextAction.get(), parentDoc, linkArea); } - LinkPrivate::get(popplerLink)->nextLinks = links; + LinkPrivate::get(popplerLink)->nextLinks = std::move(links); } return popplerLink; @@ -630,7 +630,7 @@ qpainter_output.setCallbacks(partialUpdateCallback, shouldDoPartialUpdateCallback, shouldAbortRenderCallback, payload); renderToQPainter(&qpainter_output, &painter, m_page, xres, yres, xPos, yPos, w, h, rotate, DontSaveAndRestore); painter.end(); - img = tmpimg; + img = std::move(tmpimg); break; } }
diff --git a/qt6/src/poppler-page.cc b/qt6/src/poppler-page.cc index 2a02561..dbe3d28 100644 --- a/qt6/src/poppler-page.cc +++ b/qt6/src/poppler-page.cc
@@ -630,7 +630,7 @@ qpainter_output.setCallbacks(partialUpdateCallback, shouldDoPartialUpdateCallback, shouldAbortRenderCallback, payload); renderToQPainter(&qpainter_output, &painter, m_page, xres, yres, xPos, yPos, w, h, rotate, DontSaveAndRestore); painter.end(); - img = tmpimg; + img = std::move(tmpimg); break; } }
diff --git a/splash/SplashState.cc b/splash/SplashState.cc index 4fcd17d..c64178f 100644 --- a/splash/SplashState.cc +++ b/splash/SplashState.cc
@@ -161,7 +161,7 @@ void SplashState::setLineDash(std::vector<double> &&lineDashA, double lineDashPhaseA) { - lineDash = lineDashA; + lineDash = std::move(lineDashA); lineDashPhase = lineDashPhaseA; }