Skip to content

Commit e14d44d

Browse files
filonikskypjack
authored andcommitted
Fixed Watch/Event flags. (skypjack#88)
* Fixed Watch/Event flags. * Changed parameter name to flag. * Changed parameter name to "flag". * Replaced "Watch" with "details::UVFsEvent".
1 parent 9b0185a commit e14d44d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/uvw/fs_event.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class FsEventHandle final: public Handle<FsEventHandle, uv_fs_event_t> {
7979
static void startCallback(uv_fs_event_t *handle, const char *filename, int events, int status) {
8080
FsEventHandle &fsEvent = *(static_cast<FsEventHandle*>(handle->data));
8181
if(status) { fsEvent.publish(ErrorEvent{status}); }
82-
else { fsEvent.publish(FsEventEvent{filename, static_cast<std::underlying_type_t<Event>>(events)}); }
82+
else { fsEvent.publish(FsEventEvent{filename, static_cast<std::underlying_type_t<details::UVFsEvent>>(events)}); }
8383
}
8484

8585
public:
@@ -113,7 +113,7 @@ class FsEventHandle final: public Handle<FsEventHandle, uv_fs_event_t> {
113113
* @param path The file or directory to be monitored.
114114
* @param flags Additional flags to control the behavior.
115115
*/
116-
void start(std::string path, Flags<Watch> flags = Flags<Watch>{}) {
116+
void start(std::string path, Flags<Event> flags = Flags<Event>{}) {
117117
invoke(&uv_fs_event_start, get(), &startCallback, path.data(), flags);
118118
}
119119

@@ -132,10 +132,10 @@ class FsEventHandle final: public Handle<FsEventHandle, uv_fs_event_t> {
132132
* * `FsEventHandle::Event::RECURSIVE`
133133
*
134134
* @param path The file or directory to be monitored.
135-
* @param watch Additional flag to control the behavior.
135+
* @param flag Additional flag to control the behavior.
136136
*/
137-
void start(std::string path, Watch watch) {
138-
start(std::move(path), Flags<Watch>{watch});
137+
void start(std::string path, Event flag) {
138+
start(std::move(path), Flags<Event>{flag});
139139
}
140140

141141
/**

0 commit comments

Comments
 (0)