mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 19:57:07 +02:00
[PowerRename] Fix warnings and turn on treat warnings as errors (#7840)
* Fix 2 mentioned warnings * Turn on treat warnings as errors * Remove win32 configurations
This commit is contained in:
committed by
GitHub
parent
a34afd1ca2
commit
1a64597fca
@@ -184,7 +184,6 @@ IFACEMETHODIMP CPowerRenameItem::ShouldRenameItem(_In_ DWORD flags, _Out_ bool*
|
||||
|
||||
IFACEMETHODIMP CPowerRenameItem::IsItemVisible(_In_ DWORD filter, _In_ DWORD flags, _Out_ bool* isItemVisible)
|
||||
{
|
||||
bool shouldRenameItem = false;
|
||||
switch (filter)
|
||||
{
|
||||
case PowerRenameFilters::None:
|
||||
|
||||
@@ -156,6 +156,8 @@
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<MultiProcessorCompilation Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</MultiProcessorCompilation>
|
||||
<MultiProcessorCompilation Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</MultiProcessorCompilation>
|
||||
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</TreatWarningAsError>
|
||||
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -166,19 +166,18 @@ IFACEMETHODIMP CPowerRenameManager::GetVisibleItemByIndex(_In_ UINT index, _COM_
|
||||
}
|
||||
else if (SUCCEEDED(GetVisibleItemCount(&count)) && index < count)
|
||||
{
|
||||
UINT realIndex = 0;
|
||||
int visibleIndex = -1;
|
||||
UINT realIndex = 0, visibleIndex = 0;
|
||||
for (size_t i = 0; i < m_isVisible.size(); i++)
|
||||
{
|
||||
if (m_isVisible[i])
|
||||
{
|
||||
visibleIndex++;
|
||||
}
|
||||
if (visibleIndex == index)
|
||||
if (m_isVisible[i] && visibleIndex == index)
|
||||
{
|
||||
realIndex = static_cast<UINT>(i);
|
||||
break;
|
||||
}
|
||||
if (m_isVisible[i])
|
||||
{
|
||||
visibleIndex++;
|
||||
}
|
||||
}
|
||||
hr = GetItemByIndex(realIndex, ppItem);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user