diff options
| author | Li Jin <dragon-fly@qq.com> | 2025-04-09 17:40:13 +0800 |
|---|---|---|
| committer | Li Jin <dragon-fly@qq.com> | 2025-04-09 17:40:13 +0800 |
| commit | 9750786a5c03b5ce3ea22b240d1b3cd34990856b (patch) | |
| tree | e495e43245e1bacc86d33142af202613a82a40c1 /src/3rdParty/efsw/FileWatcherKqueue.cpp | |
| parent | 571fb952b99e580a0381f539885f8f175e2ec3b0 (diff) | |
| download | yuescript-9750786a5c03b5ce3ea22b240d1b3cd34990856b.tar.gz yuescript-9750786a5c03b5ce3ea22b240d1b3cd34990856b.tar.bz2 yuescript-9750786a5c03b5ce3ea22b240d1b3cd34990856b.zip | |
Updated efsw. Fixed issue #204.
Diffstat (limited to 'src/3rdParty/efsw/FileWatcherKqueue.cpp')
| -rw-r--r--[-rwxr-xr-x] | src/3rdParty/efsw/FileWatcherKqueue.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/3rdParty/efsw/FileWatcherKqueue.cpp b/src/3rdParty/efsw/FileWatcherKqueue.cpp index 38ffad9..ad03036 100755..100644 --- a/src/3rdParty/efsw/FileWatcherKqueue.cpp +++ b/src/3rdParty/efsw/FileWatcherKqueue.cpp | |||
| @@ -45,7 +45,7 @@ FileWatcherKqueue::~FileWatcherKqueue() { | |||
| 45 | } | 45 | } |
| 46 | 46 | ||
| 47 | WatchID FileWatcherKqueue::addWatch( const std::string& directory, FileWatchListener* watcher, | 47 | WatchID FileWatcherKqueue::addWatch( const std::string& directory, FileWatchListener* watcher, |
| 48 | bool recursive ) { | 48 | bool recursive, const std::vector<WatcherOption>& /*options*/ ) { |
| 49 | static bool s_ug = false; | 49 | static bool s_ug = false; |
| 50 | 50 | ||
| 51 | std::string dir( directory ); | 51 | std::string dir( directory ); |
| @@ -184,11 +184,13 @@ void FileWatcherKqueue::run() { | |||
| 184 | void FileWatcherKqueue::handleAction( Watcher* /*watch*/, const std::string& /*filename*/, | 184 | void FileWatcherKqueue::handleAction( Watcher* /*watch*/, const std::string& /*filename*/, |
| 185 | unsigned long /*action*/, std::string /*oldFilename*/ ) {} | 185 | unsigned long /*action*/, std::string /*oldFilename*/ ) {} |
| 186 | 186 | ||
| 187 | std::list<std::string> FileWatcherKqueue::directories() { | 187 | std::vector<std::string> FileWatcherKqueue::directories() { |
| 188 | std::list<std::string> dirs; | 188 | std::vector<std::string> dirs; |
| 189 | 189 | ||
| 190 | Lock lock( mWatchesLock ); | 190 | Lock lock( mWatchesLock ); |
| 191 | 191 | ||
| 192 | dirs.reserve( mWatches.size() ); | ||
| 193 | |||
| 192 | WatchMap::iterator it = mWatches.begin(); | 194 | WatchMap::iterator it = mWatches.begin(); |
| 193 | 195 | ||
| 194 | for ( ; it != mWatches.end(); ++it ) { | 196 | for ( ; it != mWatches.end(); ++it ) { |
