loplugin:reftotemp

(plus ensuing -Werror,-Wpessimizing-move)

Change-Id: Ie2bc5310f0c4a50ba6cdc351cc99f09e7534de29
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176562
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
This commit is contained in:
Stephan Bergmann 2024-11-14 08:03:12 +01:00
parent eecdaa02b6
commit 08aa3c4fa7
2 changed files with 5 additions and 5 deletions

View file

@ -243,7 +243,7 @@ static void dumpAtspiTree(const Atspi::Accessible& pAcc, const int depth = 0)
std::cout << debugString(pAcc) << std::endl;
sal_Int32 i = 0;
for (const auto& pChild : pAcc)
for (const auto pChild : pAcc)
{
for (auto j = decltype(depth){ 0 }; j < depth; j++)
std::cout << " ";

View file

@ -35,7 +35,7 @@ protected:
{
Atspi::Accessible desktop(atspi_get_desktop(desktopId));
for (auto&& child : desktop)
for (auto const child : desktop)
{
if (!child) // is that useful?
continue;
@ -47,7 +47,7 @@ protected:
{
continue;
}
return std::move(child);
return child;
}
}
return nullptr;
@ -64,12 +64,12 @@ protected:
protected:
Atspi::Accessible getWindow(const std::string_view windowName)
{
for (auto&& child : m_pAtspiApp)
for (auto const child : m_pAtspiApp)
{
const auto name = child.getName();
std::cout << "Found window: " << name << std::endl;
if (windowName == name)
return std::move(child);
return child;
}
return nullptr;
}