Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion gframe/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
#ifdef _MSC_VER
#define mywcsncasecmp _wcsnicmp
#define mystrncasecmp _strnicmp
#elif __GNUC__
#define mywcsncasecmp _wcsnicmp
#define mystrncasecmp _strnicmp
#else
#define mywcsncasecmp wcsncasecmp
#define mystrncasecmp strncasecmp
Expand Down Expand Up @@ -54,7 +57,7 @@

template<size_t N, typename... TR>
inline int myswprintf(wchar_t(&buf)[N], const wchar_t* fmt, TR... args) {
return std::swprintf(buf, N, fmt, args...);
return swprintf(buf, N, fmt, args...);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use #ifdef if you need so

}

inline FILE* myfopen(const wchar_t* filename, const char* mode) {
Expand Down
2 changes: 1 addition & 1 deletion gframe/myfilesystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class FileSystem {

static void TraversalDir(const wchar_t* wpath, const std::function<void(const wchar_t*, bool)>& cb) {
wchar_t findstr[1024];
std::swprintf(findstr, sizeof findstr / sizeof findstr[0], L"%s/*", wpath);
swprintf(findstr, sizeof findstr / sizeof findstr[0], L"%s/*", wpath);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use #ifdef if you need so

WIN32_FIND_DATAW fdataw;
HANDLE fh = FindFirstFileW(findstr, &fdataw);
if(fh == INVALID_HANDLE_VALUE)
Expand Down