From 2502e10592925e8d9ce0885685506fdc9be4a0dd Mon Sep 17 00:00:00 2001 From: kervala Date: Wed, 3 Jan 2018 18:04:00 +0100 Subject: [PATCH] Fixed: Warnings with VC++ 2017 --HG-- branch : develop --- code/nel/tools/3d/object_viewer/object_viewer.cpp | 2 +- .../3d/plugin_max/nel_export/nel_export_filetools.cpp | 2 +- code/nel/tools/3d/tile_edit/SelectionTerritoire.cpp | 4 ++-- code/nel/tools/misc/branch_patcher/branch_patcherDlg.cpp | 7 ++----- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/code/nel/tools/3d/object_viewer/object_viewer.cpp b/code/nel/tools/3d/object_viewer/object_viewer.cpp index 2835b9b42..f1f663e38 100644 --- a/code/nel/tools/3d/object_viewer/object_viewer.cpp +++ b/code/nel/tools/3d/object_viewer/object_viewer.cpp @@ -3897,7 +3897,7 @@ bool browseFolder(const CString &caption, CString &destFolder, HWND parent) bi.lpfn = NULL; bi.lParam = NULL; bi.iImage = 0; - LPITEMIDLIST result = SHBrowseForFolder(&bi); + PIDLIST_ABSOLUTE result = SHBrowseForFolder(&bi); if (result != NULL && SHGetPathFromIDList(result, chosenPath)) { destFolder = chosenPath; diff --git a/code/nel/tools/3d/plugin_max/nel_export/nel_export_filetools.cpp b/code/nel/tools/3d/plugin_max/nel_export/nel_export_filetools.cpp index 7ecb61efe..cbc1ef88d 100644 --- a/code/nel/tools/3d/plugin_max/nel_export/nel_export_filetools.cpp +++ b/code/nel/tools/3d/plugin_max/nel_export/nel_export_filetools.cpp @@ -91,7 +91,7 @@ ULONG CNelExport::SelectDir(HWND Parent, TCHAR* Title, std::string &Path) bi.lParam=0; bi.iImage=0; - ITEMIDLIST* pidl = SHBrowseForFolder(&bi); + PIDLIST_ABSOLUTE pidl = SHBrowseForFolder(&bi); if (!SHGetPathFromIDList(pidl,str) ) { diff --git a/code/nel/tools/3d/tile_edit/SelectionTerritoire.cpp b/code/nel/tools/3d/tile_edit/SelectionTerritoire.cpp index 400b388d7..c76b9d03a 100644 --- a/code/nel/tools/3d/tile_edit/SelectionTerritoire.cpp +++ b/code/nel/tools/3d/tile_edit/SelectionTerritoire.cpp @@ -517,8 +517,8 @@ void SelectionTerritoire::OnPath() info.ulFlags=BIF_RETURNONLYFSDIRS; // Select the path - LPITEMIDLIST list; - if (list=SHBrowseForFolder (&info)) + PIDLIST_ABSOLUTE list = SHBrowseForFolder(&info); + if (list) { // Convert item into path string BOOL bRet=SHGetPathFromIDList(list, path); diff --git a/code/nel/tools/misc/branch_patcher/branch_patcherDlg.cpp b/code/nel/tools/misc/branch_patcher/branch_patcherDlg.cpp index c27111935..134eddebf 100644 --- a/code/nel/tools/misc/branch_patcher/branch_patcherDlg.cpp +++ b/code/nel/tools/misc/branch_patcher/branch_patcherDlg.cpp @@ -208,7 +208,6 @@ int CDirDialog::DoBrowse() } BROWSEINFO bInfo; - LPITEMIDLIST pidl; ZeroMemory((PVOID)&bInfo, sizeof(BROWSEINFO)); if (!m_strInitDir.IsEmpty()) @@ -258,10 +257,8 @@ int CDirDialog::DoBrowse() bInfo.lpszTitle = (m_strTitle.IsEmpty()) ? "Open" : m_strTitle; bInfo.ulFlags = BIF_RETURNFSANCESTORS | BIF_RETURNONLYFSDIRS; - if ((pidl = ::SHBrowseForFolder(&bInfo)) == NULL) - { - return 0; - } + PIDLIST_ABSOLUTE pidl = ::SHBrowseForFolder(&bInfo); + if (!pidl) return 0; m_strPath.ReleaseBuffer(); m_iImageIndex = bInfo.iImage;