From f3abf59fbf8c48aa552edfebecb388eddaa1672c Mon Sep 17 00:00:00 2001 From: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> Date: Wed, 19 Jun 2024 21:36:09 -0400 Subject: [PATCH] docs(src): fix some doxygen warnings (#2731) --- docs/Doxyfile | 3 ++- src/file_handler.cpp | 2 +- src/platform/common.h | 13 ++++++------- src/platform/linux/cuda.cpp | 4 ++-- src/platform/linux/input/legacy_input.cpp | 15 --------------- src/platform/linux/misc.cpp | 10 ---------- src/platform/linux/wayland.h | 4 +++- src/platform/macos/input.cpp | 8 -------- src/platform/macos/misc.mm | 10 ---------- src/platform/windows/input.cpp | 8 -------- src/platform/windows/misc.cpp | 10 ---------- src/upnp.cpp | 2 +- 12 files changed, 15 insertions(+), 74 deletions(-) diff --git a/docs/Doxyfile b/docs/Doxyfile index 6cb5ea3da59..4c1078a0c55 100644 --- a/docs/Doxyfile +++ b/docs/Doxyfile @@ -860,7 +860,8 @@ WARNINGS = YES # will automatically be disabled. # The default value is: YES. -WARN_IF_UNDOCUMENTED = YES +# TODO: Enable this when we have complete documentation +WARN_IF_UNDOCUMENTED = NO # If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for # potential errors in the documentation, such as documenting some parameters in diff --git a/src/file_handler.cpp b/src/file_handler.cpp index f86c1aff654..6f11bb709de 100644 --- a/src/file_handler.cpp +++ b/src/file_handler.cpp @@ -13,7 +13,7 @@ namespace file_handler { /** - * @breif Get the parent directory of a file or directory. + * @brief Get the parent directory of a file or directory. * @param path The path of the file or directory. * @return `std::string` : The parent directory. */ diff --git a/src/platform/common.h b/src/platform/common.h index c388029ba44..e7e72334703 100644 --- a/src/platform/common.h +++ b/src/platform/common.h @@ -569,13 +569,12 @@ namespace platf { audio_control(); /** - * display_name --> The name of the monitor that SHOULD be displayed - * If display_name is empty --> Use the first monitor that's compatible you can find - * If you require to use this parameter in a separate thread --> make a copy of it. - * - * config --> Stream configuration - * - * Returns display_t based on hwdevice_type + * @brief Get the display_t instance for the given hwdevice_type. + * @param display_name The name of the monitor that SHOULD be displayed + * If display_name is empty, use the first monitor that's compatible you can find + * If you require to use this parameter in a separate thread, make a copy of it. + * @param config Stream configuration + * @returns display_t based on hwdevice_type */ std::shared_ptr display(mem_type_e hwdevice_type, const std::string &display_name, const video::config_t &config); diff --git a/src/platform/linux/cuda.cpp b/src/platform/linux/cuda.cpp index 0c73dcde0b2..5c6df68d822 100644 --- a/src/platform/linux/cuda.cpp +++ b/src/platform/linux/cuda.cpp @@ -498,8 +498,8 @@ namespace cuda { /** * @brief Create a GL->CUDA encoding device for consuming captured dmabufs. - * @param in_width Width of captured frames. - * @param in_height Height of captured frames. + * @param width Width of captured frames. + * @param height Height of captured frames. * @param offset_x Offset of content in captured frame. * @param offset_y Offset of content in captured frame. * @return FFmpeg encoding device context. diff --git a/src/platform/linux/input/legacy_input.cpp b/src/platform/linux/input/legacy_input.cpp index d8362fd6995..35534ec445a 100644 --- a/src/platform/linux/input/legacy_input.cpp +++ b/src/platform/linux/input/legacy_input.cpp @@ -778,13 +778,6 @@ namespace platf { return 0; } - /** - * @brief Creates a new virtual gamepad. - * @param id The gamepad ID. - * @param metadata Controller metadata from client (empty if none provided). - * @param feedback_queue The queue for posting messages back to the client. - * @return 0 on success. - */ int alloc_gamepad(const gamepad_id_t &id, const gamepad_arrival_t &metadata, feedback_queue_t &&feedback_queue) { TUPLE_2D_REF(input, gamepad_state, gamepads[id.globalIndex]); @@ -1599,14 +1592,6 @@ namespace platf { keyboard_ev(kb, KEY_LEFTCTRL, 0); } - /** - * @brief Creates a new virtual gamepad. - * @param input The global input context. - * @param id The gamepad ID. - * @param metadata Controller metadata from client (empty if none provided). - * @param feedback_queue The queue for posting messages back to the client. - * @return 0 on success. - */ int alloc_gamepad(input_t &input, const gamepad_id_t &id, const gamepad_arrival_t &metadata, feedback_queue_t feedback_queue) { return ((input_raw_t *) input.get())->alloc_gamepad(id, metadata, std::move(feedback_queue)); diff --git a/src/platform/linux/misc.cpp b/src/platform/linux/misc.cpp index 650c319acc8..0e081c9be6d 100644 --- a/src/platform/linux/misc.cpp +++ b/src/platform/linux/misc.cpp @@ -326,11 +326,6 @@ namespace platf { lifetime::exit_sunshine(0, true); } - /** - * @brief Attempt to gracefully terminate a process group. - * @param native_handle The process group ID. - * @return true if termination was successfully requested. - */ bool request_process_group_exit(std::uintptr_t native_handle) { if (kill(-((pid_t) native_handle), SIGTERM) == 0 || errno == ESRCH) { @@ -343,11 +338,6 @@ namespace platf { } } - /** - * @brief Checks if a process group still has running children. - * @param native_handle The process group ID. - * @return true if processes are still running. - */ bool process_group_running(std::uintptr_t native_handle) { return waitpid(-((pid_t) native_handle), nullptr, WNOHANG) >= 0; diff --git a/src/platform/linux/wayland.h b/src/platform/linux/wayland.h index 062aa65f1ea..b1fd38b4350 100644 --- a/src/platform/linux/wayland.h +++ b/src/platform/linux/wayland.h @@ -196,8 +196,10 @@ namespace wl { class display_t { public: /** - * Initialize display with display_name + * @brief Initialize display. * If display_name == nullptr -> display_name = std::getenv("WAYLAND_DISPLAY") + * @param display_name The name of the display. + * @return 0 on success, -1 on failure. */ int init(const char *display_name = nullptr); diff --git a/src/platform/macos/input.cpp b/src/platform/macos/input.cpp index cbca3fffab5..992d25f7126 100644 --- a/src/platform/macos/input.cpp +++ b/src/platform/macos/input.cpp @@ -297,14 +297,6 @@ const KeyCodeMap kKeyCodesMap[] = { BOOST_LOG(info) << "unicode: Unicode input not yet implemented for MacOS."sv; } - /** - * @brief Creates a new virtual gamepad. - * @param input The input context. - * @param id The gamepad ID. - * @param metadata Controller metadata from client (empty if none provided). - * @param feedback_queue The queue for posting messages back to the client. - * @return 0 on success. - */ int alloc_gamepad(input_t &input, const gamepad_id_t &id, const gamepad_arrival_t &metadata, feedback_queue_t feedback_queue) { BOOST_LOG(info) << "alloc_gamepad: Gamepad not yet implemented for MacOS."sv; diff --git a/src/platform/macos/misc.mm b/src/platform/macos/misc.mm index 20c2247e049..1fe5e3a56ff 100644 --- a/src/platform/macos/misc.mm +++ b/src/platform/macos/misc.mm @@ -253,11 +253,6 @@ lifetime::exit_sunshine(0, true); } - /** - * @brief Attempt to gracefully terminate a process group. - * @param native_handle The process group ID. - * @return true if termination was successfully requested. - */ bool request_process_group_exit(std::uintptr_t native_handle) { if (killpg((pid_t) native_handle, SIGTERM) == 0 || errno == ESRCH) { @@ -270,11 +265,6 @@ } } - /** - * @brief Checks if a process group still has running children. - * @param native_handle The process group ID. - * @return true if processes are still running. - */ bool process_group_running(std::uintptr_t native_handle) { return waitpid(-((pid_t) native_handle), nullptr, WNOHANG) >= 0; diff --git a/src/platform/windows/input.cpp b/src/platform/windows/input.cpp index 2a917dd5e25..27e8d313ab1 100644 --- a/src/platform/windows/input.cpp +++ b/src/platform/windows/input.cpp @@ -1197,14 +1197,6 @@ namespace platf { } } - /** - * @brief Creates a new virtual gamepad. - * @param input The global input context. - * @param id The gamepad ID. - * @param metadata Controller metadata from client (empty if none provided). - * @param feedback_queue The queue for posting messages back to the client. - * @return 0 on success. - */ int alloc_gamepad(input_t &input, const gamepad_id_t &id, const gamepad_arrival_t &metadata, feedback_queue_t feedback_queue) { auto raw = (input_raw_t *) input.get(); diff --git a/src/platform/windows/misc.cpp b/src/platform/windows/misc.cpp index e136de66a70..624186715b4 100644 --- a/src/platform/windows/misc.cpp +++ b/src/platform/windows/misc.cpp @@ -1299,11 +1299,6 @@ namespace platf { return TRUE; } - /** - * @brief Attempt to gracefully terminate a process group. - * @param native_handle The job object handle. - * @return true if termination was successfully requested. - */ bool request_process_group_exit(std::uintptr_t native_handle) { auto job_handle = (HANDLE) native_handle; @@ -1348,11 +1343,6 @@ namespace platf { return enum_ctx.requested_exit; } - /** - * @brief Checks if a process group still has running children. - * @param native_handle The job object handle. - * @return true if processes are still running. - */ bool process_group_running(std::uintptr_t native_handle) { JOBOBJECT_BASIC_ACCOUNTING_INFORMATION accounting_info; diff --git a/src/upnp.cpp b/src/upnp.cpp index f65bcb87cc4..2743ebae649 100644 --- a/src/upnp.cpp +++ b/src/upnp.cpp @@ -280,8 +280,8 @@ namespace upnp { /** * @brief Unmaps all ports. + * @param urls urls_t from UPNP_GetValidIGD() * @param data IGDdatas from UPNP_GetValidIGD() - * @param data urls_t from UPNP_GetValidIGD() */ void unmap_all_upnp_ports(const urls_t &urls, const IGDdatas &data) {