diff options
author | Chris Robinson <[email protected]> | 2019-07-30 21:32:05 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-07-30 21:32:05 -0700 |
commit | f286c3fa3857579a6c7cf84f32ff953e498577bf (patch) | |
tree | 53fa7c741295ecc997aa342178efbfbc401fc7a3 /al/effect.cpp | |
parent | ac554de67d5eb353283c3359bbac15fb4ddad7d9 (diff) |
Move another function to a ALCcontext method
Diffstat (limited to 'al/effect.cpp')
-rw-r--r-- | al/effect.cpp | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/al/effect.cpp b/al/effect.cpp index b6291129..2d72916e 100644 --- a/al/effect.cpp +++ b/al/effect.cpp @@ -43,7 +43,6 @@ #include "almalloc.h" #include "alnumeric.h" #include "effects/base.h" -#include "error.h" #include "logging.h" #include "opthelpers.h" #include "vector.h" @@ -161,7 +160,7 @@ ALeffect *AllocEffect(ALCcontext *context) */ if(UNLIKELY(device->EffectList.size() >= 1<<25)) { - alSetError(context, AL_OUT_OF_MEMORY, "Too many effects allocated"); + context->setError(AL_OUT_OF_MEMORY, "Too many effects allocated"); return nullptr; } device->EffectList.emplace_back(); @@ -171,7 +170,7 @@ ALeffect *AllocEffect(ALCcontext *context) if(UNLIKELY(!sublist->Effects)) { device->EffectList.pop_back(); - alSetError(context, AL_OUT_OF_MEMORY, "Failed to allocate effect batch"); + context->setError(AL_OUT_OF_MEMORY, "Failed to allocate effect batch"); return nullptr; } @@ -224,7 +223,7 @@ START_API_FUNC if(UNLIKELY(n < 0)) { - alSetError(context.get(), AL_INVALID_VALUE, "Generating %d effects", n); + context->setError(AL_INVALID_VALUE, "Generating %d effects", n); return; } @@ -264,7 +263,7 @@ START_API_FUNC if(UNLIKELY(n < 0)) { - alSetError(context.get(), AL_INVALID_VALUE, "Deleting %d effects", n); + context->setError(AL_INVALID_VALUE, "Deleting %d effects", n); return; } if(UNLIKELY(n == 0)) @@ -282,7 +281,7 @@ START_API_FUNC ALeffect *effect{LookupEffect(device, eid)}; if(UNLIKELY(!effect)) { - alSetError(context.get(), AL_INVALID_NAME, "Invalid effect ID %u", eid); + context->setError(AL_INVALID_NAME, "Invalid effect ID %u", eid); return true; } return false; @@ -328,7 +327,7 @@ START_API_FUNC ALeffect *aleffect{LookupEffect(device, effect)}; if(UNLIKELY(!aleffect)) - alSetError(context.get(), AL_INVALID_NAME, "Invalid effect ID %u", effect); + context->setError(AL_INVALID_NAME, "Invalid effect ID %u", effect); else { if(param == AL_EFFECT_TYPE) @@ -349,7 +348,7 @@ START_API_FUNC if(isOk) InitEffectParams(aleffect, value); else - alSetError(context.get(), AL_INVALID_VALUE, "Effect type 0x%04x not supported", value); + context->setError(AL_INVALID_VALUE, "Effect type 0x%04x not supported", value); } else { @@ -378,7 +377,7 @@ START_API_FUNC ALeffect *aleffect{LookupEffect(device, effect)}; if(UNLIKELY(!aleffect)) - alSetError(context.get(), AL_INVALID_NAME, "Invalid effect ID %u", effect); + context->setError(AL_INVALID_NAME, "Invalid effect ID %u", effect); else { /* Call the appropriate handler */ @@ -398,7 +397,7 @@ START_API_FUNC ALeffect *aleffect{LookupEffect(device, effect)}; if(UNLIKELY(!aleffect)) - alSetError(context.get(), AL_INVALID_NAME, "Invalid effect ID %u", effect); + context->setError(AL_INVALID_NAME, "Invalid effect ID %u", effect); else { /* Call the appropriate handler */ @@ -418,7 +417,7 @@ START_API_FUNC ALeffect *aleffect{LookupEffect(device, effect)}; if(UNLIKELY(!aleffect)) - alSetError(context.get(), AL_INVALID_NAME, "Invalid effect ID %u", effect); + context->setError(AL_INVALID_NAME, "Invalid effect ID %u", effect); else { /* Call the appropriate handler */ @@ -438,7 +437,7 @@ START_API_FUNC const ALeffect *aleffect{LookupEffect(device, effect)}; if(UNLIKELY(!aleffect)) - alSetError(context.get(), AL_INVALID_NAME, "Invalid effect ID %u", effect); + context->setError(AL_INVALID_NAME, "Invalid effect ID %u", effect); else { if(param == AL_EFFECT_TYPE) @@ -470,7 +469,7 @@ START_API_FUNC const ALeffect *aleffect{LookupEffect(device, effect)}; if(UNLIKELY(!aleffect)) - alSetError(context.get(), AL_INVALID_NAME, "Invalid effect ID %u", effect); + context->setError(AL_INVALID_NAME, "Invalid effect ID %u", effect); else { /* Call the appropriate handler */ @@ -490,7 +489,7 @@ START_API_FUNC const ALeffect *aleffect{LookupEffect(device, effect)}; if(UNLIKELY(!aleffect)) - alSetError(context.get(), AL_INVALID_NAME, "Invalid effect ID %u", effect); + context->setError(AL_INVALID_NAME, "Invalid effect ID %u", effect); else { /* Call the appropriate handler */ @@ -510,7 +509,7 @@ START_API_FUNC const ALeffect *aleffect{LookupEffect(device, effect)}; if(UNLIKELY(!aleffect)) - alSetError(context.get(), AL_INVALID_NAME, "Invalid effect ID %u", effect); + context->setError(AL_INVALID_NAME, "Invalid effect ID %u", effect); else { /* Call the appropriate handler */ |