Skip to content

Commit

Permalink
Merge branch 'master' into modernize
Browse files Browse the repository at this point in the history
  • Loading branch information
SpartanJ committed May 22, 2024
2 parents 24235a2 + 36c1c70 commit eef303a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
7 changes: 2 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,6 @@ if(APPLE)
src/efsw/WatcherFSEvents.cpp
src/efsw/WatcherKqueue.cpp
)

if(NOT CMAKE_SYSTEM_VERSION GREATER 9)
target_compile_definitions(efsw PRIVATE EFSW_FSEVENTS_NOT_SUPPORTED)
endif()
elseif(WIN32)
list(APPEND EFSW_CPP_SOURCE
src/efsw/FileWatcherWin32.cpp
Expand All @@ -117,7 +113,8 @@ elseif(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
)
endif()

if(MSVC)
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" OR
(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC"))
target_compile_definitions(efsw PRIVATE _SCL_SECURE_NO_WARNINGS)
else()
target_compile_options(efsw PRIVATE -Wall -Wno-long-long -fPIC)
Expand Down
4 changes: 2 additions & 2 deletions src/efsw/FileSystem.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <cstring>
#include <efsw/FileSystem.hpp>
#include <efsw/platform/platformimpl.hpp>
#include <cstring>

#if EFSW_OS == EFSW_OS_MACOSX
#include <CoreFoundation/CoreFoundation.h>
Expand Down Expand Up @@ -107,7 +107,7 @@ std::string FileSystem::precomposeFileName( const std::string& name ) {
return std::string();
}

std::string result( maxSize, '\0' );
std::string result( maxSize + 1, '\0' );
if ( CFStringGetCString( cfMutable, &result[0], result.size(), kCFStringEncodingUTF8 ) ) {
result.resize( std::strlen( result.c_str() ) );
CFRelease( cfStringRef );
Expand Down

0 comments on commit eef303a

Please sign in to comment.