diff options
author | Davide Beatrici <git@davidebeatrici.dev> | 2022-06-04 03:36:48 +0300 |
---|---|---|
committer | Davide Beatrici <git@davidebeatrici.dev> | 2022-06-05 03:48:50 +0300 |
commit | 5b7f95b54f4142ca19f3bd14038adcc226d36248 (patch) | |
tree | 9cea41128bb341e993886f5eba3e3141f0c035d8 | |
parent | 799926b8a34883d39d8108f99804f822776ddda1 (diff) |
REFAC(positional-audio): Define "procid_t" as "uint64_t" instead of "uint32_t"
This allows us to take advantage of the full range provided by the plugin API.
-rw-r--r-- | plugins/HostLinux.h | 2 | ||||
-rw-r--r-- | plugins/HostWindows.h | 2 | ||||
-rw-r--r-- | plugins/ProcessBase.cpp | 2 | ||||
-rw-r--r-- | plugins/amongus/Game.cpp | 2 | ||||
-rw-r--r-- | plugins/amongus/Game.h | 2 | ||||
-rw-r--r-- | plugins/gtav/Game.cpp | 2 | ||||
-rw-r--r-- | plugins/gtav/Game.h | 2 | ||||
-rw-r--r-- | plugins/mumble_legacy_plugin.h | 4 |
8 files changed, 9 insertions, 9 deletions
diff --git a/plugins/HostLinux.h b/plugins/HostLinux.h index e945a25fa..13d96e2a2 100644 --- a/plugins/HostLinux.h +++ b/plugins/HostLinux.h @@ -8,7 +8,7 @@ #include "Module.h" -typedef uint32_t procid_t; +using procid_t = uint64_t; class HostLinux { protected: diff --git a/plugins/HostWindows.h b/plugins/HostWindows.h index 7ffb27cb4..d57089690 100644 --- a/plugins/HostWindows.h +++ b/plugins/HostWindows.h @@ -8,7 +8,7 @@ #include "Module.h" -typedef uint32_t procid_t; +using procid_t = uint64_t; class HostWindows { protected: diff --git a/plugins/ProcessBase.cpp b/plugins/ProcessBase.cpp index c084d3d35..b9180dabf 100644 --- a/plugins/ProcessBase.cpp +++ b/plugins/ProcessBase.cpp @@ -124,5 +124,5 @@ procid_t ProcessBase::find(const std::string &name, const std::multimap< std::ws return 0; } - return static_cast< procid_t >(iter->second); + return iter->second; } diff --git a/plugins/amongus/Game.cpp b/plugins/amongus/Game.cpp index 6d9389e65..1783761bd 100644 --- a/plugins/amongus/Game.cpp +++ b/plugins/amongus/Game.cpp @@ -7,7 +7,7 @@ #include "mumble_positional_audio_utils.h" -Game::Game(const uint64_t id, const std::string name) : m_proc(static_cast< procid_t >(id), name) { +Game::Game(const procid_t id, const std::string name) : m_proc(id, name) { } Mumble_PositionalDataErrorCode Game::init() { diff --git a/plugins/amongus/Game.h b/plugins/amongus/Game.h index 981b0a195..e86fc84ee 100644 --- a/plugins/amongus/Game.h +++ b/plugins/amongus/Game.h @@ -38,7 +38,7 @@ public: const std::string &context(const AmongUsClient_Fields &fields); const std::string &identity(const AmongUsClient_Fields &fields, const PlayerControl_Fields &controlFields); - Game(const uint64_t id, const std::string name); + Game(const procid_t id, const std::string name); protected: ptr_t m_client; diff --git a/plugins/gtav/Game.cpp b/plugins/gtav/Game.cpp index 7f98d39a2..01d246cbc 100644 --- a/plugins/gtav/Game.cpp +++ b/plugins/gtav/Game.cpp @@ -7,7 +7,7 @@ #include <sstream> -Game::Game(const uint64_t id, const std::string &name) : m_proc(static_cast< procid_t >(id), name) { +Game::Game(const procid_t id, const std::string &name) : m_proc(id, name) { } bool Game::setupPointers(const Module &module) { diff --git a/plugins/gtav/Game.h b/plugins/gtav/Game.h index 97a48aa0c..a70bac03a 100644 --- a/plugins/gtav/Game.h +++ b/plugins/gtav/Game.h @@ -31,7 +31,7 @@ public: const std::string &identity(const CNetGamePlayer &player, const CPlayerInfo &info, const CPed &entity); - Game(const uint64_t id, const std::string &name); + Game(const procid_t id, const std::string &name); protected: bool setupPointers(const Module &module); diff --git a/plugins/mumble_legacy_plugin.h b/plugins/mumble_legacy_plugin.h index 8c41fd23f..4e6ab8d86 100644 --- a/plugins/mumble_legacy_plugin.h +++ b/plugins/mumble_legacy_plugin.h @@ -22,8 +22,8 @@ #include <stdint.h> -typedef uint32_t procid_t; -typedef uint64_t procptr_t; +using procid_t = uint64_t; +using procptr_t = uint64_t; #define LENGTH_OF(array) (sizeof(array) / sizeof((array)[0])) |