Skip to content

Commit b8901ac

Browse files
committed
Updated to C++17.
Use non deprecated header file.
1 parent 5146d2a commit b8901ac

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

NativeCore/Windows/EnumerateProcesses.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
#include <windows.h>
22
#include <tlhelp32.h>
33
#include <psapi.h>
4-
#include <experimental/filesystem>
5-
namespace fs = std::experimental::filesystem;
4+
#include <filesystem>
65

76
#include "NativeCore.hpp"
87

@@ -73,7 +72,7 @@ void RC_CallConv EnumerateProcesses(EnumerateProcessCallback callbackProcess)
7372
EnumerateProcessData data = { };
7473
data.Id = pe32.th32ProcessID;
7574
GetModuleFileNameExW(process, nullptr, reinterpret_cast<LPWSTR>(data.Path), PATH_MAXIMUM_LENGTH);
76-
const auto name = fs::path(data.Path).filename().u16string();
75+
const auto name = std::filesystem::path(data.Path).filename().u16string();
7776
str16cpy(data.Name, name.c_str(), std::min<size_t>(name.length(), PATH_MAXIMUM_LENGTH - 1));
7877

7978
callbackProcess(&data);

NativeCore/Windows/NativeCore.vcxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@
104104
<WarningLevel>Level3</WarningLevel>
105105
<Optimization>Disabled</Optimization>
106106
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;NATIVECORE_EXPORTS;_CRT_SECURE_NO_WARNINGS;NOMINMAX;RECLASSNET32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
107+
<LanguageStandard>stdcpp17</LanguageStandard>
107108
</ClCompile>
108109
<Link>
109110
<SubSystem>Windows</SubSystem>
@@ -119,6 +120,7 @@
119120
<WarningLevel>Level3</WarningLevel>
120121
<Optimization>Disabled</Optimization>
121122
<PreprocessorDefinitions>_DEBUG;_WINDOWS;_USRDLL;NATIVECORE_EXPORTS;_CRT_SECURE_NO_WARNINGS;NOMINMAX;RECLASSNET64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
123+
<LanguageStandard>stdcpp17</LanguageStandard>
122124
</ClCompile>
123125
<Link>
124126
<SubSystem>Windows</SubSystem>
@@ -136,6 +138,7 @@
136138
<FunctionLevelLinking>true</FunctionLevelLinking>
137139
<IntrinsicFunctions>true</IntrinsicFunctions>
138140
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;NATIVECORE_EXPORTS;_CRT_SECURE_NO_WARNINGS;NOMINMAX;RECLASSNET32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
141+
<LanguageStandard>stdcpp17</LanguageStandard>
139142
</ClCompile>
140143
<Link>
141144
<SubSystem>Windows</SubSystem>
@@ -155,6 +158,7 @@
155158
<FunctionLevelLinking>true</FunctionLevelLinking>
156159
<IntrinsicFunctions>true</IntrinsicFunctions>
157160
<PreprocessorDefinitions>NDEBUG;_WINDOWS;_USRDLL;NATIVECORE_EXPORTS;_CRT_SECURE_NO_WARNINGS;NOMINMAX;RECLASSNET64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
161+
<LanguageStandard>stdcpp17</LanguageStandard>
158162
</ClCompile>
159163
<Link>
160164
<SubSystem>Windows</SubSystem>

0 commit comments

Comments
 (0)