Skip to content

Commit 857e676

Browse files
committed
[RFR] : refactor
1 parent d5ea142 commit 857e676

1 file changed

Lines changed: 30 additions & 29 deletions

File tree

ImGuiFileDialog.cpp

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -37,43 +37,44 @@ SOFTWARE.
3737
#include <ctime>
3838
#include <sys/stat.h>
3939
#include <cstdio>
40+
// this option need c++17
41+
#ifdef USE_STD_FILESYSTEM
42+
#include <filesystem>
43+
#endif
4044
#if defined (__EMSCRIPTEN__) // EMSCRIPTEN
41-
#include <emscripten.h>
45+
#include <emscripten.h>
4246
#endif // EMSCRIPTEN
4347
#if defined(__WIN32__) || defined(_WIN32)
44-
#ifndef WIN32
45-
#define WIN32
46-
#endif // WIN32
47-
#define stat _stat
48-
#define stricmp _stricmp
49-
#include <cctype>
50-
// this option need c++17
51-
#ifdef USE_STD_FILESYSTEM
52-
#include <filesystem>
53-
#include <Windows.h>
54-
#else
55-
#include "dirent/dirent.h" // directly open the dirent file attached to this lib
56-
#endif // USE_STD_FILESYSTEM
57-
#define PATH_SEP '\\'
58-
#ifndef PATH_MAX
59-
#define PATH_MAX 260
60-
#endif // PATH_MAX
48+
#ifndef WIN32
49+
#define WIN32
50+
#endif // WIN32
51+
#define stat _stat
52+
#define stricmp _stricmp
53+
#include <cctype>
54+
// this option need c++17
55+
#ifdef USE_STD_FILESYSTEM
56+
#include <Windows.h>
57+
#else
58+
#include "dirent/dirent.h" // directly open the dirent file attached to this lib
59+
#endif // USE_STD_FILESYSTEM
60+
#define PATH_SEP '\\'
61+
#ifndef PATH_MAX
62+
#define PATH_MAX 260
63+
#endif // PATH_MAX
6164
#elif defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__) || defined (__EMSCRIPTEN__)
62-
#define UNIX
63-
#define stricmp strcasecmp
64-
#include <sys/types.h>
65-
// this option need c++17
66-
#ifdef USE_STD_FILESYSTEM
67-
#include <filesystem>
68-
#else
69-
#include <dirent.h>
70-
#endif // USE_STD_FILESYSTEM
71-
#define PATH_SEP '/'
65+
#define UNIX
66+
#define stricmp strcasecmp
67+
#include <sys/types.h>
68+
// this option need c++17
69+
#ifndef USE_STD_FILESYSTEM
70+
#include <dirent.h>
71+
#endif // USE_STD_FILESYSTEM
72+
#define PATH_SEP '/'
7273
#endif // defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__)
7374

7475
#include "imgui.h"
7576
#ifndef IMGUI_DEFINE_MATH_OPERATORS
76-
#define IMGUI_DEFINE_MATH_OPERATORS
77+
#define IMGUI_DEFINE_MATH_OPERATORS
7778
#endif // IMGUI_DEFINE_MATH_OPERATORS
7879
#include "imgui_internal.h"
7980

0 commit comments

Comments
 (0)