Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/windirstat.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Schneider <oliver@assarbad.net>2017-11-20 23:43:25 +0300
committerOliver Schneider <oliver@assarbad.net>2017-11-20 23:43:25 +0300
commit916f7162919565c9dfce0fc8e90f8cb7ab283c6d (patch)
treea15d19383da005136d8f0cef9ab67e70875f8f91
parentc7f9ce9698fd0ff23da40b5d823616d918f0ad63 (diff)
Minor cleanup
And another fix to premake4.lua and subsequently the one affected project
-rw-r--r--common/commonhelpers.cpp14
-rw-r--r--premake4.lua2
-rw-r--r--windirstat/Dialogs/aboutdlg.cpp5
-rw-r--r--windirstat/globalhelpers.cpp19
-rw-r--r--windirstat/windirstat.vs15.vcxproj8
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("(</GenerateDebugInformation>)", "%1\n" .. string.format("%s<FullProgramDatabaseFile>%s</FullProgramDatabaseFile>", indent, tostring(cfg.flags.Symbols ~= nil)))
+ captured = captured:gsub("true(</GenerateDebugInformation>)", "DebugFull%1\n" .. string.format("%s<FullProgramDatabaseFile>%s</FullProgramDatabaseFile>", 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 <common/version.h>
#include <common/wds_constants.h>
#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<IShellFolder> pshf;
- HRESULT hr = ::SHGetDesktopFolder(&pshf);
- MdThrowFailed(hr, _T("::SHGetDesktopFolder"));
-
- LPITEMIDLIST pidl;
- hr = pshf->ParseDisplayName(NULL, NULL, const_cast<LPOLESTR>(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 @@
</ResourceCompile>
<Link>
<SubSystem>Windows</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
+ <GenerateDebugInformation>DebugFull</GenerateDebugInformation>
<FullProgramDatabaseFile>true</FullProgramDatabaseFile>
<AdditionalDependencies>psapi.lib;delayimp.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)wds32D.exe</OutputFile>
@@ -153,7 +153,7 @@
</ResourceCompile>
<Link>
<SubSystem>Windows</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
+ <GenerateDebugInformation>DebugFull</GenerateDebugInformation>
<FullProgramDatabaseFile>true</FullProgramDatabaseFile>
<AdditionalDependencies>psapi.lib;delayimp.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)wds64D.exe</OutputFile>
@@ -187,7 +187,7 @@
</ResourceCompile>
<Link>
<SubSystem>Windows</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
+ <GenerateDebugInformation>DebugFull</GenerateDebugInformation>
<FullProgramDatabaseFile>true</FullProgramDatabaseFile>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
@@ -223,7 +223,7 @@
</ResourceCompile>
<Link>
<SubSystem>Windows</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
+ <GenerateDebugInformation>DebugFull</GenerateDebugInformation>
<FullProgramDatabaseFile>true</FullProgramDatabaseFile>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>