@@ -795,7 +795,7 @@ class CWebDiffWindow : public IWebDiffWindow
795
795
{
796
796
int oldDiffIndex = m_currentDiffIndex;
797
797
++m_currentDiffIndex;
798
- if (m_currentDiffIndex >= m_diffInfos.size ())
798
+ if (static_cast < size_t >( m_currentDiffIndex) >= m_diffInfos.size ())
799
799
m_currentDiffIndex = static_cast <int >(m_diffInfos.size ()) - 1 ;
800
800
if (oldDiffIndex == m_currentDiffIndex)
801
801
return false ;
@@ -879,15 +879,15 @@ class CWebDiffWindow : public IWebDiffWindow
879
879
880
880
bool SelectDiff (int diffIndex) override
881
881
{
882
- if (diffIndex < 0 || diffIndex >= m_diffInfos.size ())
882
+ if (diffIndex < 0 || static_cast < size_t >( diffIndex) >= m_diffInfos.size ())
883
883
return false ;
884
884
m_currentDiffIndex = diffIndex;
885
885
return SUCCEEDED (selectDiff (diffIndex, nullptr ));
886
886
}
887
887
888
888
int GetNextDiffIndex () const override
889
889
{
890
- if (m_diffInfos.size () == 0 || m_currentDiffIndex >= m_diffInfos.size () - 1 )
890
+ if (m_diffInfos.size () == 0 || m_currentDiffIndex >= static_cast < int >( m_diffInfos.size () - 1 ) )
891
891
return -1 ;
892
892
return m_currentDiffIndex + 1 ;
893
893
}
@@ -1042,7 +1042,7 @@ class CWebDiffWindow : public IWebDiffWindow
1042
1042
}
1043
1043
m_diffInfos = Comparer::compare (m_diffOptions, textSegments);
1044
1044
Comparer::setNodeIdInDiffInfoList (m_diffInfos, textSegments);
1045
- if (m_currentDiffIndex != -1 && m_currentDiffIndex >= m_diffInfos.size ())
1045
+ if (m_currentDiffIndex != -1 && static_cast < size_t >( m_currentDiffIndex) >= m_diffInfos.size ())
1046
1046
m_currentDiffIndex = static_cast <int >(m_diffInfos.size () - 1 );
1047
1047
if (m_bShowDifferences)
1048
1048
{
@@ -1311,7 +1311,7 @@ class CWebDiffWindow : public IWebDiffWindow
1311
1311
1312
1312
HRESULT selectDiff (int diffIndex, IWebDiffCallback* callback)
1313
1313
{
1314
- if (diffIndex < 0 || diffIndex >= m_diffInfos.size ())
1314
+ if (diffIndex < 0 || static_cast < size_t >( diffIndex) >= m_diffInfos.size ())
1315
1315
return false ;
1316
1316
ComPtr<IWebDiffCallback> callback2 (callback);
1317
1317
std::shared_ptr<std::vector<std::wstring>> jsons (new std::vector<std::wstring>());
0 commit comments