From 4078e1d17c0fb1439ee5a0ba1e539f06a8f47aab Mon Sep 17 00:00:00 2001 From: Kamikadze <40305144+Kam1k4dze@users.noreply.github.com> Date: Sat, 31 May 2025 18:02:02 +0500 Subject: refactor: replace all `typedef` with `using` (#10594) --- src/plugins/PluginAPI.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/plugins/PluginAPI.hpp') diff --git a/src/plugins/PluginAPI.hpp b/src/plugins/PluginAPI.hpp index 0f333294..00a1e8b2 100644 --- a/src/plugins/PluginAPI.hpp +++ b/src/plugins/PluginAPI.hpp @@ -31,12 +31,12 @@ Feel like the API is missing something you'd like to use in your plugin? Open an #include #include -typedef struct { +using PLUGIN_DESCRIPTION_INFO = struct { std::string name; std::string description; std::string author; std::string version; -} PLUGIN_DESCRIPTION_INFO; +}; struct SFunctionMatch { void* address = nullptr; @@ -83,7 +83,7 @@ class CWindow; This function should not be modified, see the example plugin. */ -typedef REQUIRED std::string (*PPLUGIN_API_VERSION_FUNC)(); +using PPLUGIN_API_VERSION_FUNC = REQUIRED std::string (*)(); #define PLUGIN_API_VERSION pluginAPIVersion #define PLUGIN_API_VERSION_FUNC_STR "pluginAPIVersion" @@ -93,7 +93,7 @@ typedef REQUIRED std::string (*PPLUGIN_API_VERSION_FUNC)(); Keep in mind this is executed synchronously, and as such any blocking calls to hyprland might hang. (e.g. system("hyprctl ...")) */ -typedef REQUIRED PLUGIN_DESCRIPTION_INFO (*PPLUGIN_INIT_FUNC)(HANDLE); +using PPLUGIN_INIT_FUNC = REQUIRED PLUGIN_DESCRIPTION_INFO (*)(HANDLE); #define PLUGIN_INIT pluginInit #define PLUGIN_INIT_FUNC_STR "pluginInit" @@ -103,7 +103,7 @@ typedef REQUIRED PLUGIN_DESCRIPTION_INFO (*PPLUGIN_INIT_FUNC)(HANDLE); Hooks are unloaded after exit. */ -typedef OPTIONAL void (*PPLUGIN_EXIT_FUNC)(); +using PPLUGIN_EXIT_FUNC = OPTIONAL void (*)(); #define PLUGIN_EXIT pluginExit #define PLUGIN_EXIT_FUNC_STR "pluginExit" -- cgit v1.2.3