diff options
author | Chris Robinson <[email protected]> | 2023-12-08 04:33:32 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-12-08 04:33:32 -0800 |
commit | 8f661a2f59e63cbed540b512dc564a3aca7c4211 (patch) | |
tree | 8c8fbd2be037eaaf254feabe061642bea96c4bd2 /core | |
parent | 5b5b948516f7340810ebbfdd5e46eb40f85d2e56 (diff) |
Fix some clang-tidy warnings
Diffstat (limited to 'core')
-rw-r--r-- | core/async_event.h | 3 | ||||
-rw-r--r-- | core/effects/base.h | 4 | ||||
-rw-r--r-- | core/except.h | 6 |
3 files changed, 7 insertions, 6 deletions
diff --git a/core/async_event.h b/core/async_event.h index f1ca0c7b..20857c9c 100644 --- a/core/async_event.h +++ b/core/async_event.h @@ -1,6 +1,7 @@ #ifndef CORE_EVENT_H #define CORE_EVENT_H +#include <array> #include <stdint.h> #include <variant> @@ -39,7 +40,7 @@ struct AsyncBufferCompleteEvent { }; struct AsyncDisconnectEvent { - char msg[244]; + std::array<char,244> msg; }; struct AsyncEffectReleaseEvent { diff --git a/core/effects/base.h b/core/effects/base.h index 83df7cf0..7d8770fb 100644 --- a/core/effects/base.h +++ b/core/effects/base.h @@ -71,10 +71,10 @@ union EffectProps { float DecayLFRatio; float ReflectionsGain; float ReflectionsDelay; - float ReflectionsPan[3]; + std::array<float,3> ReflectionsPan; float LateReverbGain; float LateReverbDelay; - float LateReverbPan[3]; + std::array<float,3> LateReverbPan; float EchoTime; float EchoDepth; float ModulationTime; diff --git a/core/except.h b/core/except.h index 0e28e9df..eec876db 100644 --- a/core/except.h +++ b/core/except.h @@ -14,12 +14,12 @@ class base_exception : public std::exception { protected: base_exception() = default; - virtual ~base_exception(); + ~base_exception() override; - void setMessage(const char *msg, std::va_list args); + auto setMessage(const char *msg, std::va_list args) -> void; public: - const char *what() const noexcept override { return mMessage.c_str(); } + [[nodiscard]] auto what() const noexcept -> const char* override { return mMessage.c_str(); } }; } // namespace al |