From 916f7162919565c9dfce0fc8e90f8cb7ab283c6d Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Mon, 20 Nov 2017 20:43:25 +0000 Subject: Minor cleanup And another fix to premake4.lua and subsequently the one affected project --- common/commonhelpers.cpp | 14 ++++---------- premake4.lua | 2 +- windirstat/Dialogs/aboutdlg.cpp | 5 ----- windirstat/globalhelpers.cpp | 19 ------------------- windirstat/windirstat.vs15.vcxproj | 8 ++++---- 5 files changed, 9 insertions(+), 39 deletions(-) diff --git a/common/commonhelpers.cpp b/common/commonhelpers.cpp index 6d5750a..48f94b5 100644 --- a/common/commonhelpers.cpp +++ b/common/commonhelpers.cpp @@ -23,29 +23,23 @@ CString MyStrRetToString(const LPITEMIDLIST pidl, const STRRET *strret) { - // TODO: replace with shallow wrapper around StrRetToStr - - // StrRetToStr() is not always available (e.g. on Windows 98). - // So we use an own function instead. - USES_CONVERSION; - CString s; switch (strret->uType) { case STRRET_CSTR: { - s = strret->cStr; - } + s.Format(_T("%hs"), strret->cStr); + } break; case STRRET_OFFSET: { - s = A2T((char *)pidl + strret->uOffset); + s.Format(_T("%hs"), (char *)pidl + strret->uOffset); } break; case STRRET_WSTR: { - s = W2T(strret->pOleStr); + s = strret->pOleStr; } break; } diff --git a/premake4.lua b/premake4.lua index 146f6ea..3010bd8 100644 --- a/premake4.lua +++ b/premake4.lua @@ -142,7 +142,7 @@ do local captured = io.endcapture() local indent = io.indent .. io.indent .. io.indent assert(io.indent ~= nil, "io.indent must not be nil at this point!") - captured = captured:gsub("()", "%1\n" .. string.format("%s%s", indent, tostring(cfg.flags.Symbols ~= nil))) + captured = captured:gsub("true()", "DebugFull%1\n" .. string.format("%s%s", indent, tostring(cfg.flags.Symbols ~= nil))) if old_captured ~= nil then io.captured = old_captured .. captured -- restore outer captured state, if any else diff --git a/windirstat/Dialogs/aboutdlg.cpp b/windirstat/Dialogs/aboutdlg.cpp index 5ed8296..14c9d63 100644 --- a/windirstat/Dialogs/aboutdlg.cpp +++ b/windirstat/Dialogs/aboutdlg.cpp @@ -21,7 +21,6 @@ #include "stdafx.h" #include "windirstat.h" -#include #include #include "aboutdlg.h" @@ -133,8 +132,6 @@ void CAboutDlg::CMyTabControl::Initialize() void CAboutDlg::CMyTabControl::SetPageText(int tab) { - USES_CONVERSION; - CString text; DWORD newStyle = ES_CENTER; @@ -262,8 +259,6 @@ CAboutDlg::CAboutDlg() CString CAboutDlg::GetAppVersion() { - USES_CONVERSION; - CString s; s.Format(_T("WinDirStat %s"), _T("1.x.y.z")); // FIXME return s; diff --git a/windirstat/globalhelpers.cpp b/windirstat/globalhelpers.cpp index 4481b7c..dced820 100644 --- a/windirstat/globalhelpers.cpp +++ b/windirstat/globalhelpers.cpp @@ -661,22 +661,3 @@ BOOL IsAdmin() return FALSE; } - -/* -// Retrieve an Item ID list from a given path. -// Returns a valid pidl, or throws an exception. -LPCITEMIDLIST SHGetPIDLFromPath(CString path) -{ - USES_CONVERSION; - - CComPtr pshf; - HRESULT hr = ::SHGetDesktopFolder(&pshf); - MdThrowFailed(hr, _T("::SHGetDesktopFolder")); - - LPITEMIDLIST pidl; - hr = pshf->ParseDisplayName(NULL, NULL, const_cast(T2CW(path)), NULL, &pidl, NULL); - MdThrowFailed(hr, _T("ParseDisplayName")); - - return pidl; -} -*/ diff --git a/windirstat/windirstat.vs15.vcxproj b/windirstat/windirstat.vs15.vcxproj index 55a67fb..11f6ceb 100644 --- a/windirstat/windirstat.vs15.vcxproj +++ b/windirstat/windirstat.vs15.vcxproj @@ -119,7 +119,7 @@ Windows - true + DebugFull true psapi.lib;delayimp.lib;%(AdditionalDependencies) $(OutDir)wds32D.exe @@ -153,7 +153,7 @@ Windows - true + DebugFull true psapi.lib;delayimp.lib;%(AdditionalDependencies) $(OutDir)wds64D.exe @@ -187,7 +187,7 @@ Windows - true + DebugFull true true true @@ -223,7 +223,7 @@ Windows - true + DebugFull true true true -- cgit v1.2.3