diff --git a/src/uvw/enum.hpp b/src/uvw/enum.hpp index 12bc1a50..d4cb33e2 100644 --- a/src/uvw/enum.hpp +++ b/src/uvw/enum.hpp @@ -13,21 +13,21 @@ * two values provided. */ template -[[nodiscard]] constexpr std::enable_if_t, decltype(Type::_UVW_ENUM)> +[[nodiscard]] constexpr std::enable_if_t, decltype(Type::UVW_ENUM)> operator|(const Type lhs, const Type rhs) noexcept { return static_cast(static_cast>(lhs) | static_cast>(rhs)); } /*! @copydoc operator| */ template -[[nodiscard]] constexpr std::enable_if_t, decltype(Type::_UVW_ENUM)> +[[nodiscard]] constexpr std::enable_if_t, decltype(Type::UVW_ENUM)> operator&(const Type lhs, const Type rhs) noexcept { return static_cast(static_cast>(lhs) & static_cast>(rhs)); } /*! @copydoc operator| */ template -[[nodiscard]] constexpr std::enable_if_t, decltype(Type::_UVW_ENUM)> +[[nodiscard]] constexpr std::enable_if_t, decltype(Type::UVW_ENUM)> operator^(const Type lhs, const Type rhs) noexcept { return static_cast(static_cast>(lhs) ^ static_cast>(rhs)); } @@ -40,35 +40,35 @@ operator^(const Type lhs, const Type rhs) noexcept { * value provided. */ template -[[nodiscard]] constexpr std::enable_if_t, decltype(Type::_UVW_ENUM)> +[[nodiscard]] constexpr std::enable_if_t, decltype(Type::UVW_ENUM)> operator~(const Type value) noexcept { return static_cast(~static_cast>(value)); } /*! @copydoc operator~ */ template -[[nodiscard]] constexpr std::enable_if_t, decltype(Type::_UVW_ENUM, bool{})> +[[nodiscard]] constexpr std::enable_if_t, decltype(Type::UVW_ENUM, bool{})> operator!(const Type value) noexcept { return !static_cast>(value); } /*! @copydoc operator| */ template -constexpr std::enable_if_t, decltype(Type::_UVW_ENUM) &> +constexpr std::enable_if_t, decltype(Type::UVW_ENUM) &> operator|=(Type &lhs, const Type rhs) noexcept { return (lhs = (lhs | rhs)); } /*! @copydoc operator| */ template -constexpr std::enable_if_t, decltype(Type::_UVW_ENUM) &> +constexpr std::enable_if_t, decltype(Type::UVW_ENUM) &> operator&=(Type &lhs, const Type rhs) noexcept { return (lhs = (lhs & rhs)); } /*! @copydoc operator| */ template -constexpr std::enable_if_t, decltype(Type::_UVW_ENUM) &> +constexpr std::enable_if_t, decltype(Type::UVW_ENUM) &> operator^=(Type &lhs, const Type rhs) noexcept { return (lhs = (lhs ^ rhs)); } diff --git a/src/uvw/fs.h b/src/uvw/fs.h index 5a429591..f049e395 100644 --- a/src/uvw/fs.h +++ b/src/uvw/fs.h @@ -91,20 +91,20 @@ enum class uvw_file_open_flags : int { TEMPORARY = UV_FS_O_TEMPORARY, TRUNC = UV_FS_O_TRUNC, WRONLY = UV_FS_O_WRONLY, - _UVW_ENUM = 0 + UVW_ENUM = 0 }; enum class uvw_copy_file_flags : int { EXCL = UV_FS_COPYFILE_EXCL, FICLONE = UV_FS_COPYFILE_FICLONE, FICLONE_FORCE = UV_FS_COPYFILE_FICLONE_FORCE, - _UVW_ENUM = 0 + UVW_ENUM = 0 }; enum class uvw_symlink_flags : int { DIR = UV_FS_SYMLINK_DIR, JUNCTION = UV_FS_SYMLINK_JUNCTION, - _UVW_ENUM = 0 + UVW_ENUM = 0 }; } // namespace details @@ -886,7 +886,7 @@ class fs_req final: public fs_request { * @param path New path, as described in the official documentation. * @param flags Optional additional flags. */ - void copyfile(const std::string &old, const std::string &path, copy_file_flags flags = copy_file_flags::_UVW_ENUM); + void copyfile(const std::string &old, const std::string &path, copy_file_flags flags = copy_file_flags::UVW_ENUM); /** * @brief Copies a file synchronously from a path to a new one. @@ -907,7 +907,7 @@ class fs_req final: public fs_request { * @param flags Optional additional flags. * @return True in case of success, false otherwise. */ - bool copyfile_sync(const std::string &old, const std::string &path, copy_file_flags flags = copy_file_flags::_UVW_ENUM); + bool copyfile_sync(const std::string &old, const std::string &path, copy_file_flags flags = copy_file_flags::UVW_ENUM); /** * @brief Async [access](http://linux.die.net/man/2/access). @@ -1003,7 +1003,7 @@ class fs_req final: public fs_request { * @param path New path, as described in the official documentation. * @param flags Optional additional flags. */ - void symlink(const std::string &old, const std::string &path, symlink_flags flags = symlink_flags::_UVW_ENUM); + void symlink(const std::string &old, const std::string &path, symlink_flags flags = symlink_flags::UVW_ENUM); /** * @brief Sync [symlink](http://linux.die.net/man/2/symlink). @@ -1020,7 +1020,7 @@ class fs_req final: public fs_request { * @param flags Flags, as described in the official documentation. * @return True in case of success, false otherwise. */ - bool symlink_sync(const std::string &old, const std::string &path, symlink_flags flags = symlink_flags::_UVW_ENUM); + bool symlink_sync(const std::string &old, const std::string &path, symlink_flags flags = symlink_flags::UVW_ENUM); /** * @brief Async [readlink](http://linux.die.net/man/2/readlink). diff --git a/src/uvw/fs_event.h b/src/uvw/fs_event.h index aa8cf243..5d64b8cb 100644 --- a/src/uvw/fs_event.h +++ b/src/uvw/fs_event.h @@ -18,7 +18,7 @@ enum class uvw_fs_event_flags : std::underlying_type_t { WATCH_ENTRY = UV_FS_EVENT_WATCH_ENTRY, STAT = UV_FS_EVENT_STAT, RECURSIVE = UV_FS_EVENT_RECURSIVE, - _UVW_ENUM = 0 + UVW_ENUM = 0 }; enum class uvw_fs_event : std::underlying_type_t { @@ -96,7 +96,7 @@ class fs_event_handle final: public handle { READABLE = UV_READABLE, WRITABLE = UV_WRITABLE, - _UVW_ENUM = 0 + UVW_ENUM = 0 }; } diff --git a/src/uvw/poll.h b/src/uvw/poll.h index 1470b316..17257b40 100644 --- a/src/uvw/poll.h +++ b/src/uvw/poll.h @@ -18,7 +18,7 @@ enum class uvw_poll_event : std::underlying_type_t { WRITABLE = UV_WRITABLE, DISCONNECT = UV_DISCONNECT, PRIORITIZED = UV_PRIORITIZED, - _UVW_ENUM = 0 + UVW_ENUM = 0 }; } diff --git a/src/uvw/process.h b/src/uvw/process.h index 7767c35a..91d0089a 100644 --- a/src/uvw/process.h +++ b/src/uvw/process.h @@ -26,7 +26,7 @@ enum class uvw_process_flags : std::underlying_type_t { WINDOWS_HIDE_CONSOLE = UV_PROCESS_WINDOWS_HIDE_CONSOLE, WINDOWS_HIDE_GUI = UV_PROCESS_WINDOWS_HIDE_GUI, WINDOWS_FILE_PATH_EXACT_NAME = UV_PROCESS_WINDOWS_FILE_PATH_EXACT_NAME, - _UVW_ENUM = 0 + UVW_ENUM = 0 }; enum class uvw_stdio_flags : std::underlying_type_t { @@ -37,7 +37,7 @@ enum class uvw_stdio_flags : std::underlying_type_t { READABLE_PIPE = UV_READABLE_PIPE, WRITABLE_PIPE = UV_WRITABLE_PIPE, OVERLAPPED_PIPE = UV_OVERLAPPED_PIPE, - _UVW_ENUM = 0 + UVW_ENUM = 0 }; } // namespace details diff --git a/src/uvw/tcp.h b/src/uvw/tcp.h index e1a251a5..56b0d797 100644 --- a/src/uvw/tcp.h +++ b/src/uvw/tcp.h @@ -19,7 +19,7 @@ namespace details { enum class uvw_tcp_flags : std::underlying_type_t { IPV6ONLY = UV_TCP_IPV6ONLY, - _UVW_ENUM = 0 + UVW_ENUM = 0 }; } @@ -115,7 +115,7 @@ class tcp_handle final: public stream_handle { * @param opts Optional additional flags. * @return Underlying return value. */ - int bind(const sockaddr &addr, tcp_flags opts = tcp_flags::_UVW_ENUM); + int bind(const sockaddr &addr, tcp_flags opts = tcp_flags::UVW_ENUM); /** * @brief Binds the handle to an address and port. @@ -133,7 +133,7 @@ class tcp_handle final: public stream_handle { * @param opts Optional additional flags. * @return Underlying return value. */ - int bind(const std::string &ip, unsigned int port, tcp_flags opts = tcp_flags::_UVW_ENUM); + int bind(const std::string &ip, unsigned int port, tcp_flags opts = tcp_flags::UVW_ENUM); /** * @brief Binds the handle to an address and port. @@ -150,7 +150,7 @@ class tcp_handle final: public stream_handle { * @param opts Optional additional flags. * @return Underlying return value. */ - int bind(socket_address addr, tcp_flags opts = tcp_flags::_UVW_ENUM); + int bind(socket_address addr, tcp_flags opts = tcp_flags::UVW_ENUM); /** * @brief Gets the current address to which the handle is bound. diff --git a/src/uvw/udp.h b/src/uvw/udp.h index 1f975cbd..4034c200 100644 --- a/src/uvw/udp.h +++ b/src/uvw/udp.h @@ -38,7 +38,7 @@ enum class uvw_udp_flags : std::underlying_type_t { UDP_MMSG_FREE = UV_UDP_MMSG_FREE, UDP_LINUX_RECVERR = UV_UDP_LINUX_RECVERR, UDP_RECVMMSG = UV_UDP_RECVMMSG, - _UVW_ENUM = 0 + UVW_ENUM = 0 }; enum class uvw_membership : std::underlying_type_t { @@ -193,7 +193,7 @@ class udp_handle final: public handle