renaming things to avoid name clashing
This commit is contained in:
parent
7dd32d11ed
commit
b45676ecf3
@ -25,7 +25,7 @@ protected:
|
|||||||
static void close_callback(uv_handle_t *hndl) {
|
static void close_callback(uv_handle_t *hndl) {
|
||||||
handle<T, U, E...> &ref = *(static_cast<T *>(hndl->data));
|
handle<T, U, E...> &ref = *(static_cast<T *>(hndl->data));
|
||||||
[[maybe_unused]] auto ptr = ref.shared_from_this();
|
[[maybe_unused]] auto ptr = ref.shared_from_this();
|
||||||
ref.reset();
|
ref.self_reset();
|
||||||
ref.publish(close_event{});
|
ref.publish(close_event{});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -20,7 +20,7 @@ class request: public resource<T, U, E...> {
|
|||||||
protected:
|
protected:
|
||||||
static auto reserve(U *req) {
|
static auto reserve(U *req) {
|
||||||
auto ptr = static_cast<T *>(req->data)->shared_from_this();
|
auto ptr = static_cast<T *>(req->data)->shared_from_this();
|
||||||
ptr->reset();
|
ptr->self_reset();
|
||||||
return ptr;
|
return ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -25,11 +25,11 @@ protected:
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
void reset() noexcept {
|
void self_reset() noexcept {
|
||||||
self_ptr.reset();
|
self_ptr.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool self() const noexcept {
|
bool has_self() const noexcept {
|
||||||
return static_cast<bool>(self_ptr);
|
return static_cast<bool>(self_ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -32,7 +32,7 @@ UVW_INLINE bool tty_handle::mode(tty_handle::tty_mode m) {
|
|||||||
return (0 == uv_tty_set_mode(raw(), static_cast<uv_tty_mode_t>(m)));
|
return (0 == uv_tty_set_mode(raw(), static_cast<uv_tty_mode_t>(m)));
|
||||||
}
|
}
|
||||||
|
|
||||||
UVW_INLINE bool tty_handle::reset() noexcept {
|
UVW_INLINE bool tty_handle::reset_mode() noexcept {
|
||||||
return (0 == uv_tty_reset_mode());
|
return (0 == uv_tty_reset_mode());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -84,7 +84,7 @@ public:
|
|||||||
* @brief Resets TTY settings to default values.
|
* @brief Resets TTY settings to default values.
|
||||||
* @return True in case of success, false otherwise.
|
* @return True in case of success, false otherwise.
|
||||||
*/
|
*/
|
||||||
bool reset() noexcept;
|
bool reset_mode() noexcept;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Gets the current Window size.
|
* @brief Gets the current Window size.
|
||||||
|
|||||||
@ -23,7 +23,7 @@ TEST(TTY, Functionalities) {
|
|||||||
hndl.close();
|
hndl.close();
|
||||||
});
|
});
|
||||||
|
|
||||||
ASSERT_TRUE(handle->reset());
|
ASSERT_TRUE(handle->reset_mode());
|
||||||
ASSERT_TRUE(!handle->readable() || handle->mode(uvw::tty_handle::tty_mode::NORMAL));
|
ASSERT_TRUE(!handle->readable() || handle->mode(uvw::tty_handle::tty_mode::NORMAL));
|
||||||
ASSERT_NO_THROW(handle->get_win_size());
|
ASSERT_NO_THROW(handle->get_win_size());
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user