diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2024-09-25 17:35:11 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2024-09-25 17:35:11 +0200 |
| commit | cbbf1f1353eb55ee459d40f77b765adaf70df401 (patch) | |
| tree | 08511190685f3bb8d9909af3f96969d1886e4a32 /core | |
| parent | 238bdb7e3eba4f039234998380b2ad70e4162060 (diff) | |
| download | turns-cbbf1f1353eb55ee459d40f77b765adaf70df401.tar.xz turns-cbbf1f1353eb55ee459d40f77b765adaf70df401.zip | |
core: simplify participant property implementations
Diffstat (limited to 'core')
| -rw-r--r-- | core/include/turns/core/participant.hpp | 58 |
1 files changed, 30 insertions, 28 deletions
diff --git a/core/include/turns/core/participant.hpp b/core/include/turns/core/participant.hpp index a58e198..23d6211 100644 --- a/core/include/turns/core/participant.hpp +++ b/core/include/turns/core/participant.hpp @@ -24,34 +24,11 @@ namespace turns::core auto operator<=>(participant const & other) const noexcept -> std::partial_ordering; - auto defeated(this auto && self) - { - return self.m_defeated.get_proxy(); - } - - template<typename Self> - auto disposition(this Self && self) - { - return self.m_disposition.get_proxy(); - } - - template<typename Self> - auto is_active(this Self && self) - { - return self.m_is_active.get_proxy(); - } - - template<typename Self> - auto name(this Self && self) - { - return self.m_name.get_proxy(); - } - - template<typename Self> - auto priority(this Self && self) - { - return self.m_priority.get_proxy(); - } + auto defeated(this auto && self); + auto disposition(this auto && self); + auto is_active(this auto && self); + auto name(this auto && self); + auto priority(this auto && self); auto serialize() -> nlohmann::json; @@ -63,6 +40,31 @@ namespace turns::core Glib::Property<float> m_priority{*this, "priority", 0.0f}; }; + auto participant::defeated(this auto && self) + { + return self.m_defeated.get_proxy(); + } + + auto participant::disposition(this auto && self) + { + return self.m_disposition.get_proxy(); + } + + auto participant::is_active(this auto && self) + { + return self.m_is_active.get_proxy(); + } + + auto participant::name(this auto && self) + { + return self.m_name.get_proxy(); + } + + auto participant::priority(this auto && self) + { + return self.m_priority.get_proxy(); + } + } // namespace turns::core #endif
\ No newline at end of file |
