aboutsummaryrefslogtreecommitdiffstats
path: root/al
diff options
context:
space:
mode:
Diffstat (limited to 'al')
-rw-r--r--al/auxeffectslot.cpp2
-rw-r--r--al/buffer.cpp2
-rw-r--r--al/eax/call.h2
-rw-r--r--al/effect.cpp2
-rw-r--r--al/filter.cpp2
-rw-r--r--al/source.cpp29
-rw-r--r--al/state.cpp2
7 files changed, 23 insertions, 18 deletions
diff --git a/al/auxeffectslot.cpp b/al/auxeffectslot.cpp
index 66a65b5c..33252410 100644
--- a/al/auxeffectslot.cpp
+++ b/al/auxeffectslot.cpp
@@ -239,7 +239,7 @@ EffectSlotType EffectSlotTypeFromEnum(ALenum type)
bool EnsureEffectSlots(ALCcontext *context, size_t needed)
{
size_t count{std::accumulate(context->mEffectSlotList.cbegin(),
- context->mEffectSlotList.cend(), size_t{0},
+ context->mEffectSlotList.cend(), 0_uz,
[](size_t cur, const EffectSlotSubList &sublist) noexcept -> size_t
{ return cur + static_cast<ALuint>(al::popcount(sublist.FreeMask)); })};
diff --git a/al/buffer.cpp b/al/buffer.cpp
index 28afc7c0..8ba874e4 100644
--- a/al/buffer.cpp
+++ b/al/buffer.cpp
@@ -174,7 +174,7 @@ constexpr ALbitfieldSOFT INVALID_MAP_FLAGS{~unsigned(AL_MAP_READ_BIT_SOFT | AL_M
bool EnsureBuffers(ALCdevice *device, size_t needed)
{
- size_t count{std::accumulate(device->BufferList.cbegin(), device->BufferList.cend(), size_t{0},
+ size_t count{std::accumulate(device->BufferList.cbegin(), device->BufferList.cend(), 0_uz,
[](size_t cur, const BufferSubList &sublist) noexcept -> size_t
{ return cur + static_cast<ALuint>(al::popcount(sublist.FreeMask)); })};
diff --git a/al/eax/call.h b/al/eax/call.h
index f2ad529e..45ff328c 100644
--- a/al/eax/call.h
+++ b/al/eax/call.h
@@ -61,7 +61,7 @@ public:
template<typename TValue>
al::span<TValue> get_values() const
{
- return get_values<TValue>(~size_t{});
+ return get_values<TValue>(~0_uz);
}
template<typename TException, typename TValue>
diff --git a/al/effect.cpp b/al/effect.cpp
index 5c7f9627..c4b06407 100644
--- a/al/effect.cpp
+++ b/al/effect.cpp
@@ -162,7 +162,7 @@ void InitEffectParams(ALeffect *effect, ALenum type)
bool EnsureEffects(ALCdevice *device, size_t needed)
{
- size_t count{std::accumulate(device->EffectList.cbegin(), device->EffectList.cend(), size_t{0},
+ size_t count{std::accumulate(device->EffectList.cbegin(), device->EffectList.cend(), 0_uz,
[](size_t cur, const EffectSubList &sublist) noexcept -> size_t
{ return cur + static_cast<ALuint>(al::popcount(sublist.FreeMask)); })};
diff --git a/al/filter.cpp b/al/filter.cpp
index e6520e6a..f0a078b7 100644
--- a/al/filter.cpp
+++ b/al/filter.cpp
@@ -117,7 +117,7 @@ void InitFilterParams(ALfilter *filter, ALenum type)
bool EnsureFilters(ALCdevice *device, size_t needed)
{
- size_t count{std::accumulate(device->FilterList.cbegin(), device->FilterList.cend(), size_t{0},
+ size_t count{std::accumulate(device->FilterList.cbegin(), device->FilterList.cend(), 0_uz,
[](size_t cur, const FilterSubList &sublist) noexcept -> size_t
{ return cur + static_cast<ALuint>(al::popcount(sublist.FreeMask)); })};
diff --git a/al/source.cpp b/al/source.cpp
index 01a981d3..2fbd1703 100644
--- a/al/source.cpp
+++ b/al/source.cpp
@@ -719,8 +719,7 @@ inline ALenum GetSourceState(ALsource *source, Voice *voice)
bool EnsureSources(ALCcontext *context, size_t needed)
{
- size_t count{std::accumulate(context->mSourceList.cbegin(), context->mSourceList.cend(),
- size_t{0},
+ size_t count{std::accumulate(context->mSourceList.cbegin(), context->mSourceList.cend(), 0_uz,
[](size_t cur, const SourceSubList &sublist) noexcept -> size_t
{ return cur + static_cast<ALuint>(al::popcount(sublist.FreeMask)); })};
@@ -3697,7 +3696,8 @@ ALsource* ALsource::EaxLookupSource(ALCcontext& al_context, ALuint source_id) no
void ALsource::eax_set_sends_defaults(EaxSends& sends, const EaxFxSlotIds& ids) noexcept
{
- for (auto i = size_t{}; i < EAX_MAX_FXSLOTS; ++i) {
+ for(size_t i{0};i < EAX_MAX_FXSLOTS;++i)
+ {
auto& send = sends[i];
send.guidReceivingFXSlotID = *(ids[i]);
send.lSend = EAXSOURCE_DEFAULTSEND;
@@ -3809,7 +3809,8 @@ void ALsource::eax5_set_active_fx_slots_defaults(EAX50ACTIVEFXSLOTS& slots) noex
void ALsource::eax5_set_speaker_levels_defaults(EaxSpeakerLevels& speaker_levels) noexcept
{
- for (auto i = size_t{}; i < eax_max_speakers; ++i) {
+ for(size_t i{0};i < eax_max_speakers;++i)
+ {
auto& speaker_level = speaker_levels[i];
speaker_level.lSpeakerID = static_cast<long>(EAXSPEAKER_FRONT_LEFT + i);
speaker_level.lLevel = EAXSOURCE_DEFAULTSPEAKERLEVEL;
@@ -3912,7 +3913,7 @@ void ALsource::eax4_translate(const Eax4Props& src, Eax5Props& dst) noexcept
//
dst.sends = src.sends;
- for (auto i = size_t{}; i < EAX_MAX_FXSLOTS; ++i)
+ for(size_t i{0};i < EAX_MAX_FXSLOTS;++i)
dst.sends[i].guidReceivingFXSlotID = *(eax5_fx_slot_ids[i]);
// Active FX slots.
@@ -3974,19 +3975,21 @@ EaxAlLowPassParam ALsource::eax_create_direct_filter_param() const noexcept
static_cast<float>(mEax.source.lDirectHF) +
static_cast<float>(mEax.source.lObstruction);
- for (auto i = std::size_t{}; i < EAX_MAX_FXSLOTS; ++i)
+ for(size_t i{0};i < EAX_MAX_FXSLOTS;++i)
{
if(!mEaxActiveFxSlots[i])
continue;
- if(has_source_occlusion) {
+ if(has_source_occlusion)
+ {
const auto& fx_slot = mEaxAlContext->eaxGetFxSlot(i);
const auto& fx_slot_eax = fx_slot.eax_get_eax_fx_slot();
const auto is_environmental_fx = ((fx_slot_eax.ulFlags & EAXFXSLOTFLAGS_ENVIRONMENT) != 0);
const auto is_primary = (mEaxPrimaryFxSlotId.value_or(-1) == fx_slot.eax_get_index());
const auto is_listener_environment = (is_environmental_fx && is_primary);
- if(is_listener_environment) {
+ if(is_listener_environment)
+ {
gain_mb += eax_calculate_dst_occlusion_mb(
mEax.source.lOcclusion,
mEax.source.flOcclusionDirectRatio,
@@ -3998,7 +4001,8 @@ EaxAlLowPassParam ALsource::eax_create_direct_filter_param() const noexcept
const auto& send = mEax.sends[i];
- if(send.lOcclusion != 0) {
+ if(send.lOcclusion != 0)
+ {
gain_mb += eax_calculate_dst_occlusion_mb(
send.lOcclusion,
send.flOcclusionDirectRatio,
@@ -4073,8 +4077,9 @@ void ALsource::eax_update_direct_filter()
void ALsource::eax_update_room_filters()
{
- for (auto i = size_t{}; i < EAX_MAX_FXSLOTS; ++i) {
- if (!mEaxActiveFxSlots[i])
+ for(size_t i{0};i < EAX_MAX_FXSLOTS;++i)
+ {
+ if(!mEaxActiveFxSlots[i])
continue;
auto& fx_slot = mEaxAlContext->eaxGetFxSlot(i);
@@ -4880,7 +4885,7 @@ void ALsource::eax_commit_active_fx_slots()
// Deactivate EFX auxiliary effect slots for inactive slots. Active slots
// will be updated with the room filters.
- for(auto i = size_t{}; i < EAX_MAX_FXSLOTS; ++i)
+ for(size_t i{0};i < EAX_MAX_FXSLOTS;++i)
{
if(!mEaxActiveFxSlots[i])
eax_set_al_source_send(nullptr, i, EaxAlLowPassParam{1.0f, 1.0f});
diff --git a/al/state.cpp b/al/state.cpp
index 1c41d63c..5131edd9 100644
--- a/al/state.cpp
+++ b/al/state.cpp
@@ -229,7 +229,7 @@ void GetValue(ALCcontext *context, ALenum pname, T *values)
case AL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_EXT:
{
std::lock_guard<std::mutex> _{context->mDebugCbLock};
- *values = cast_value(context->mDebugLog.empty() ? size_t{0}
+ *values = cast_value(context->mDebugLog.empty() ? 0_uz
: (context->mDebugLog.front().mMessage.size()+1));
return;
}