diff options
author | Chris Robinson <[email protected]> | 2018-11-18 03:39:32 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-11-18 03:39:32 -0800 |
commit | 7433cb5f4cb0515dd6e314978f579ae91e2c63c4 (patch) | |
tree | 1a2e51d6e819cabcd51ac24fafe345a47a469667 /Alc | |
parent | bf30eb0391b84e81353139354d2ec665942847f1 (diff) |
Avoid naming a struct member the same as an enum type
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/alc.cpp | 4 | ||||
-rw-r--r-- | Alc/alcontext.h | 4 | ||||
-rw-r--r-- | Alc/alu.cpp | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/Alc/alc.cpp b/Alc/alc.cpp index 6aec72d0..ec836bfa 100644 --- a/Alc/alc.cpp +++ b/Alc/alc.cpp @@ -2628,7 +2628,7 @@ static ALvoid InitContext(ALCcontext *Context) ATOMIC_INIT(&Context->ActiveAuxSlots, auxslots); //Set globals - Context->DistanceModel = DistanceModel::Default; + Context->mDistanceModel = DistanceModel::Default; Context->SourceDistanceModel = AL_FALSE; Context->DopplerFactor = 1.0f; Context->DopplerVelocity = 1.0f; @@ -2661,7 +2661,7 @@ static ALvoid InitContext(ALCcontext *Context) listener.Params.ReverbSpeedOfSound = listener.Params.SpeedOfSound * listener.Params.MetersPerUnit; listener.Params.SourceDistanceModel = Context->SourceDistanceModel; - listener.Params.DistanceModel = Context->DistanceModel; + listener.Params.mDistanceModel = Context->mDistanceModel; Context->AsyncEvents = ll_ringbuffer_create(63, sizeof(AsyncEvent), false); diff --git a/Alc/alcontext.h b/Alc/alcontext.h index d0a2dc51..26da4464 100644 --- a/Alc/alcontext.h +++ b/Alc/alcontext.h @@ -59,7 +59,7 @@ struct ALCcontext_struct { ATOMIC(ALenum) LastError; - enum DistanceModel DistanceModel; + DistanceModel mDistanceModel; ALboolean SourceDistanceModel; ALfloat DopplerFactor; @@ -171,7 +171,7 @@ struct ALcontextProps { ALfloat DopplerVelocity; ALfloat SpeedOfSound; ALboolean SourceDistanceModel; - enum DistanceModel DistanceModel; + DistanceModel mDistanceModel; ALfloat MetersPerUnit; ATOMIC(struct ALcontextProps*) next; diff --git a/Alc/alu.cpp b/Alc/alu.cpp index 91d9e758..92aa2bc4 100644 --- a/Alc/alu.cpp +++ b/Alc/alu.cpp @@ -328,7 +328,7 @@ static bool CalcContextParams(ALCcontext *Context) Listener.Params.MetersPerUnit; Listener.Params.SourceDistanceModel = props->SourceDistanceModel; - Listener.Params.DistanceModel = props->DistanceModel; + Listener.Params.mDistanceModel = props->mDistanceModel; ATOMIC_REPLACE_HEAD(struct ALcontextProps*, &Context->FreeContextProps, props); return true; @@ -1210,7 +1210,7 @@ static void CalcAttnSourceParams(ALvoice *voice, const struct ALvoiceProps *prop ClampedDist = Distance; switch(Listener.Params.SourceDistanceModel ? - props->DistanceModel : Listener.Params.DistanceModel) + props->mDistanceModel : Listener.Params.mDistanceModel) { case DistanceModel::InverseClamped: ClampedDist = clampf(ClampedDist, props->RefDistance, props->MaxDistance); |