diff options
Diffstat (limited to 'alc')
-rw-r--r-- | alc/context.cpp | 23 | ||||
-rw-r--r-- | alc/context.h | 2 |
2 files changed, 10 insertions, 15 deletions
diff --git a/alc/context.cpp b/alc/context.cpp index bb4930ee..7d10a91d 100644 --- a/alc/context.cpp +++ b/alc/context.cpp @@ -369,21 +369,16 @@ void ALCcontext::sendDebugMessage(DebugSource source, DebugType type, ALuint id, throw std::runtime_error{"Unexpected debug severity value "+std::to_string(al::to_underlying(severity))}; }; - auto iditer = mDebugIdFilters.find(id); - if(iditer != mDebugIdFilters.end()) - { - const uint filter{(1u<<(DebugSourceBase+al::to_underlying(source))) - | (1u<<(DebugTypeBase+al::to_underlying(type)))}; - - auto iter = std::lower_bound(iditer->second.cbegin(), iditer->second.cend(), filter); - if(iter != iditer->second.cend() && *iter == filter) - return; - } - - const uint filter{(1u<<(DebugSourceBase+al::to_underlying(source))) - | (1u<<(DebugTypeBase+al::to_underlying(type))) - | (1u<<(DebugSeverityBase+al::to_underlying(severity)))}; + const uint64_t idfilter{(1_u64 << (DebugSourceBase+al::to_underlying(source))) + | (1_u64 << (DebugTypeBase+al::to_underlying(type))) + | (uint64_t{id} << 32)}; + auto iditer = std::lower_bound(mDebugIdFilters.cbegin(), mDebugIdFilters.cend(), idfilter); + if(iditer != mDebugIdFilters.cend() && *iditer == idfilter) + return; + const uint filter{(1u << (DebugSourceBase+al::to_underlying(source))) + | (1u << (DebugTypeBase+al::to_underlying(type))) + | (1u << (DebugSeverityBase+al::to_underlying(severity)))}; auto iter = std::lower_bound(mDebugFilters.cbegin(), mDebugFilters.cend(), filter); if(iter != mDebugFilters.cend() && *iter == filter) return; diff --git a/alc/context.h b/alc/context.h index c626160b..b3f548c8 100644 --- a/alc/context.h +++ b/alc/context.h @@ -146,7 +146,7 @@ struct ALCcontext : public al::intrusive_ref<ALCcontext>, ContextBase { ALDEBUGPROCSOFT mDebugCb{}; void *mDebugParam{nullptr}; std::vector<uint> mDebugFilters; - std::unordered_map<uint,std::vector<uint>> mDebugIdFilters; + std::vector<uint64_t> mDebugIdFilters; std::deque<LogEntry> mDebugLog; ALlistener mListener{}; |