From bb08a416f1b0e31292b896f2f8845e365daee6b1 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 1 May 2023 17:11:49 -0700 Subject: Put the debug filters into a group --- alc/context.h | 60 ++++++++--------------------------------------------------- 1 file changed, 8 insertions(+), 52 deletions(-) (limited to 'alc/context.h') diff --git a/alc/context.h b/alc/context.h index b3f548c8..3e31c9b8 100644 --- a/alc/context.h +++ b/alc/context.h @@ -33,57 +33,14 @@ struct ALeffect; struct ALeffectslot; struct ALsource; +struct DebugGroup; +struct DebugLogEntry; -using uint = unsigned int; - +enum class DebugSource : uint8_t; +enum class DebugType : uint8_t; +enum class DebugSeverity : uint8_t; -constexpr uint DebugSourceBase{0}; -enum class DebugSource : uint8_t { - API = 0, - System, - ThirdParty, - Application, - Other, -}; -constexpr uint DebugSourceCount{5}; - -constexpr uint DebugTypeBase{DebugSourceBase + DebugSourceCount}; -enum class DebugType : uint8_t { - Error = 0, - DeprecatedBehavior, - UndefinedBehavior, - Portability, - Performance, - Marker, - Other, -}; -constexpr uint DebugTypeCount{7}; - -constexpr uint DebugSeverityBase{DebugTypeBase + DebugTypeCount}; -enum class DebugSeverity : uint8_t { - High = 0, - Medium, - Low, - Notification, -}; -constexpr uint DebugSeverityCount{4}; - -struct LogEntry { - const DebugSource mSource; - const DebugType mType; - const DebugSeverity mSeverity; - const uint mId; - - std::string mMessage; - - template - LogEntry(DebugSource source, DebugType type, uint id, DebugSeverity severity, T&& message) - : mSource{source}, mType{type}, mSeverity{severity}, mId{id} - , mMessage{std::forward(message)} - { } - LogEntry(const LogEntry&) = default; - LogEntry(LogEntry&&) = default; -}; +using uint = unsigned int; struct SourceSubList { @@ -145,9 +102,8 @@ struct ALCcontext : public al::intrusive_ref, ContextBase { std::mutex mDebugCbLock; ALDEBUGPROCSOFT mDebugCb{}; void *mDebugParam{nullptr}; - std::vector mDebugFilters; - std::vector mDebugIdFilters; - std::deque mDebugLog; + std::vector mDebugGroups; + std::deque mDebugLog; ALlistener mListener{}; -- cgit v1.2.3