From cfe8c31260fe2fabba1a3ce77adb6a85fc1fae47 Mon Sep 17 00:00:00 2001 From: Li Jin Date: Wed, 16 Nov 2022 10:53:09 +0800 Subject: fix build. update doc. --- src/3rdParty/efsw/FileInfo.hpp | 4 +++- src/3rdParty/efsw/FileWatcherFSEvents.cpp | 6 +++--- src/3rdParty/efsw/FileWatcherKqueue.cpp | 4 ++-- src/3rdParty/efsw/String.cpp | 16 ++++++++-------- src/3rdParty/efsw/Utf.inl | 6 +++--- src/3rdParty/efsw/WatcherFSEvents.cpp | 2 +- 6 files changed, 20 insertions(+), 18 deletions(-) (limited to 'src/3rdParty') diff --git a/src/3rdParty/efsw/FileInfo.hpp b/src/3rdParty/efsw/FileInfo.hpp index a8dd3d3..f1bcf4b 100755 --- a/src/3rdParty/efsw/FileInfo.hpp +++ b/src/3rdParty/efsw/FileInfo.hpp @@ -18,10 +18,12 @@ class FileInfo { FileInfo(); - FileInfo( const std::string& filepath ); + explicit FileInfo( const std::string& filepath ); FileInfo( const std::string& filepath, bool linkInfo ); + FileInfo( const FileInfo& ) = default; + bool operator==( const FileInfo& Other ) const; bool operator!=( const FileInfo& Other ) const; diff --git a/src/3rdParty/efsw/FileWatcherFSEvents.cpp b/src/3rdParty/efsw/FileWatcherFSEvents.cpp index 970810d..bcfdbe6 100755 --- a/src/3rdParty/efsw/FileWatcherFSEvents.cpp +++ b/src/3rdParty/efsw/FileWatcherFSEvents.cpp @@ -41,7 +41,7 @@ bool FileWatcherFSEvents::isGranular() { return getOSXReleaseNumber() >= 11; } -void FileWatcherFSEvents::FSEventCallback( ConstFSEventStreamRef streamRef, void* userData, +void FileWatcherFSEvents::FSEventCallback( ConstFSEventStreamRef /*streamRef*/, void* userData, size_t numEvents, void* eventPaths, const FSEventStreamEventFlags eventFlags[], const FSEventStreamEventId eventIds[] ) { @@ -208,8 +208,8 @@ void FileWatcherFSEvents::run() { mRunLoopRef = NULL; } -void FileWatcherFSEvents::handleAction( Watcher* watch, const std::string& filename, - unsigned long action, std::string oldFilename ) { +void FileWatcherFSEvents::handleAction( Watcher* /*watch*/, const std::string& /*filename*/, + unsigned long /*action*/, std::string /*oldFilename*/ ) { /// Not used } diff --git a/src/3rdParty/efsw/FileWatcherKqueue.cpp b/src/3rdParty/efsw/FileWatcherKqueue.cpp index 9c86755..38ffad9 100755 --- a/src/3rdParty/efsw/FileWatcherKqueue.cpp +++ b/src/3rdParty/efsw/FileWatcherKqueue.cpp @@ -181,8 +181,8 @@ void FileWatcherKqueue::run() { } while ( mInitOK ); } -void FileWatcherKqueue::handleAction( Watcher* watch, const std::string& filename, - unsigned long action, std::string oldFilename ) {} +void FileWatcherKqueue::handleAction( Watcher* /*watch*/, const std::string& /*filename*/, + unsigned long /*action*/, std::string /*oldFilename*/ ) {} std::list FileWatcherKqueue::directories() { std::list dirs; diff --git a/src/3rdParty/efsw/String.cpp b/src/3rdParty/efsw/String.cpp index 8c9a3cc..e3ba68f 100755 --- a/src/3rdParty/efsw/String.cpp +++ b/src/3rdParty/efsw/String.cpp @@ -382,7 +382,7 @@ String& String::assign( const String& str, size_t pos, size_t n ) { return *this; } -String& String::assign( const char* s, size_t n ) { +String& String::assign( const char* s, size_t /*n*/ ) { String tmp( s ); mString.assign( tmp.mString ); @@ -416,7 +416,7 @@ String& String::append( const String& str, size_t pos, size_t n ) { return *this; } -String& String::append( const char* s, size_t n ) { +String& String::append( const char* s, size_t /*n*/ ) { String tmp( s ); mString.append( tmp.mString ); @@ -510,7 +510,7 @@ std::size_t String::find( const String& str, std::size_t start ) const { return mString.find( str.mString, start ); } -std::size_t String::find( const char* s, std::size_t pos, std::size_t n ) const { +std::size_t String::find( const char* s, std::size_t pos, std::size_t /*n*/ ) const { return find( String( s ), pos ); } @@ -526,7 +526,7 @@ std::size_t String::rfind( const String& str, std::size_t pos ) const { return mString.rfind( str.mString, pos ); } -std::size_t String::rfind( const char* s, std::size_t pos, std::size_t n ) const { +std::size_t String::rfind( const char* s, std::size_t pos, std::size_t /*n*/ ) const { return rfind( String( s ), pos ); } @@ -575,7 +575,7 @@ std::size_t String::find_first_of( const String& str, std::size_t pos ) const { return mString.find_first_of( str.mString, pos ); } -std::size_t String::find_first_of( const char* s, std::size_t pos, std::size_t n ) const { +std::size_t String::find_first_of( const char* s, std::size_t pos, std::size_t /*n*/ ) const { return find_first_of( String( s ), pos ); } @@ -591,7 +591,7 @@ std::size_t String::find_last_of( const String& str, std::size_t pos ) const { return mString.find_last_of( str.mString, pos ); } -std::size_t String::find_last_of( const char* s, std::size_t pos, std::size_t n ) const { +std::size_t String::find_last_of( const char* s, std::size_t pos, std::size_t /*n*/ ) const { return find_last_of( String( s ), pos ); } @@ -607,7 +607,7 @@ std::size_t String::find_first_not_of( const String& str, std::size_t pos ) cons return mString.find_first_not_of( str.mString, pos ); } -std::size_t String::find_first_not_of( const char* s, std::size_t pos, std::size_t n ) const { +std::size_t String::find_first_not_of( const char* s, std::size_t pos, std::size_t /*n*/ ) const { return find_first_not_of( String( s ), pos ); } @@ -623,7 +623,7 @@ std::size_t String::find_last_not_of( const String& str, std::size_t pos ) const return mString.find_last_not_of( str.mString, pos ); } -std::size_t String::find_last_not_of( const char* s, std::size_t pos, std::size_t n ) const { +std::size_t String::find_last_not_of( const char* s, std::size_t pos, std::size_t /*n*/ ) const { return find_last_not_of( String( s ), pos ); } diff --git a/src/3rdParty/efsw/Utf.inl b/src/3rdParty/efsw/Utf.inl index 7e3e9d6..5b6c2e0 100755 --- a/src/3rdParty/efsw/Utf.inl +++ b/src/3rdParty/efsw/Utf.inl @@ -375,17 +375,17 @@ template Out Utf<16>::ToUtf32( In begin, In end, Out return output; } -template In Utf<32>::Decode( In begin, In end, Uint32& output, Uint32 ) { +template In Utf<32>::Decode( In begin, In /*end*/, Uint32& output, Uint32 ) { output = *begin++; return begin; } -template Out Utf<32>::Encode( Uint32 input, Out output, Uint32 replacement ) { +template Out Utf<32>::Encode( Uint32 input, Out output, Uint32 /*replacement*/ ) { *output++ = input; return output; } -template In Utf<32>::Next( In begin, In end ) { +template In Utf<32>::Next( In begin, In /*end*/ ) { return ++begin; } diff --git a/src/3rdParty/efsw/WatcherFSEvents.cpp b/src/3rdParty/efsw/WatcherFSEvents.cpp index 6ccf527..b562d3c 100755 --- a/src/3rdParty/efsw/WatcherFSEvents.cpp +++ b/src/3rdParty/efsw/WatcherFSEvents.cpp @@ -11,7 +11,7 @@ WatcherFSEvents::WatcherFSEvents() : Watcher(), FWatcher( NULL ), FSStream( NULL ), WatcherGen( NULL ), initializedAsync( false ) {} WatcherFSEvents::WatcherFSEvents( WatchID id, std::string directory, FileWatchListener* listener, - bool recursive, WatcherFSEvents* parent ) : + bool recursive, WatcherFSEvents* /*parent*/ ) : Watcher( id, directory, listener, recursive ), FWatcher( NULL ), FSStream( NULL ), -- cgit v1.2.3-55-g6feb