Fix the compiling failure on x64 build

This commit is contained in:
Don HO 2018-06-27 02:15:55 +02:00
parent ef13902206
commit 587d3494c7
2 changed files with 8 additions and 8 deletions

View File

@ -684,7 +684,7 @@ bool PluginViewList::removeFromListIndex(size_t index2remove)
for (size_t i = 0; i < _ui.nbItem(); ++i) for (size_t i = 0; i < _ui.nbItem(); ++i)
{ {
if (_ui.getLParamFromIndex(i) == reinterpret_cast<LPARAM>(_list[index2remove])) if (_ui.getLParamFromIndex(static_cast<int>(i)) == reinterpret_cast<LPARAM>(_list[index2remove]))
{ {
if (!_ui.removeFromIndex(i)) if (!_ui.removeFromIndex(i))
return false; return false;
@ -700,9 +700,9 @@ bool PluginViewList::removeFromPluginInfoPtr(PluginUpdateInfo* pluginInfo2hide)
{ {
for (size_t i = 0; i < _ui.nbItem(); ++i) for (size_t i = 0; i < _ui.nbItem(); ++i)
{ {
if (_ui.getLParamFromIndex(i) == reinterpret_cast<LPARAM>(pluginInfo2hide)) if (_ui.getLParamFromIndex(static_cast<int>(i)) == reinterpret_cast<LPARAM>(pluginInfo2hide))
{ {
if (!_ui.removeFromIndex(i)) if (!_ui.removeFromIndex(static_cast<int>(i)))
{ {
return false; return false;
} }
@ -725,9 +725,9 @@ bool PluginViewList::hideFromPluginInfoPtr(PluginUpdateInfo* pluginInfo2hide)
{ {
for (size_t i = 0; i < _ui.nbItem(); ++i) for (size_t i = 0; i < _ui.nbItem(); ++i)
{ {
if (_ui.getLParamFromIndex(i) == reinterpret_cast<LPARAM>(pluginInfo2hide)) if (_ui.getLParamFromIndex(static_cast<int>(i)) == reinterpret_cast<LPARAM>(pluginInfo2hide))
{ {
if (!_ui.removeFromIndex(i)) if (!_ui.removeFromIndex(static_cast<int>(i)))
{ {
return false; return false;
} }
@ -769,9 +769,9 @@ bool PluginViewList::hideFromListIndex(size_t index2hide)
for (size_t i = 0; i < _ui.nbItem(); ++i) for (size_t i = 0; i < _ui.nbItem(); ++i)
{ {
if (_ui.getLParamFromIndex(i) == reinterpret_cast<LPARAM>(_list[index2hide])) if (_ui.getLParamFromIndex(static_cast<int>(i)) == reinterpret_cast<LPARAM>(_list[index2hide]))
{ {
if (!_ui.removeFromIndex(i)) if (!_ui.removeFromIndex(static_cast<int>(i)))
return false; return false;
} }
} }

View File

@ -109,7 +109,7 @@ public:
void reSizeView(RECT & rc) { _ui.reSizeTo(rc); } void reSizeView(RECT & rc) { _ui.reSizeTo(rc); }
void setViewStyleOption(int32_t extraStyle) { _ui.setStyleOption(extraStyle); }; void setViewStyleOption(int32_t extraStyle) { _ui.setStyleOption(extraStyle); };
size_t nbItem() const { return _ui.nbItem(); }; size_t nbItem() const { return _ui.nbItem(); };
PluginUpdateInfo* getPluginInfoFromUiIndex(int index) const { return reinterpret_cast<PluginUpdateInfo*>(_ui.getLParamFromIndex(index)); }; PluginUpdateInfo* getPluginInfoFromUiIndex(size_t index) const { return reinterpret_cast<PluginUpdateInfo*>(_ui.getLParamFromIndex(static_cast<int>(index))); };
PluginUpdateInfo* findPluginInfoFromFolderName(const generic_string& folderName, int& index) const; PluginUpdateInfo* findPluginInfoFromFolderName(const generic_string& folderName, int& index) const;
bool removeFromListIndex(size_t index2remove); bool removeFromListIndex(size_t index2remove);
bool hideFromListIndex(size_t index2Hide); bool hideFromListIndex(size_t index2Hide);