aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alSource.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-11-29 22:56:33 -0800
committerChris Robinson <[email protected]>2018-11-29 22:56:33 -0800
commitb582f1346a2e0e2e82eb4a2d4e72d670cc066971 (patch)
tree8bc7620d811602360cccf867bb5aecfde0320300 /OpenAL32/alSource.cpp
parent8ca8da30bd587cefcd86e3a2b9401821af65e502 (diff)
Avoid hard-coding a couple sizes
Diffstat (limited to 'OpenAL32/alSource.cpp')
-rw-r--r--OpenAL32/alSource.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/OpenAL32/alSource.cpp b/OpenAL32/alSource.cpp
index 9911bcc5..0eaed61f 100644
--- a/OpenAL32/alSource.cpp
+++ b/OpenAL32/alSource.cpp
@@ -91,11 +91,11 @@ void UpdateSourceProps(ALsource *source, ALvoice *voice, ALCcontext *context)
props->RefDistance = source->RefDistance;
props->MaxDistance = source->MaxDistance;
props->RolloffFactor = source->RolloffFactor;
- std::copy_n(source->Position, 3, props->Position);
- std::copy_n(source->Velocity, 3, props->Velocity);
- std::copy_n(source->Direction, 3, props->Direction);
- for(ALsizei i{0};i < 2;i++)
- std::copy_n(source->Orientation[i], 3, props->Orientation[i]);
+ std::copy(std::begin(source->Position), std::end(source->Position), props->Position);
+ std::copy(std::begin(source->Velocity), std::end(source->Velocity), props->Velocity);
+ std::copy(std::begin(source->Direction), std::end(source->Direction), props->Direction);
+ std::copy(std::begin(source->Orientation[0]), std::end(source->Orientation[0]), props->Orientation[0]);
+ std::copy(std::begin(source->Orientation[1]), std::end(source->Orientation[1]), props->Orientation[1]);
props->HeadRelative = source->HeadRelative;
props->mDistanceModel = source->mDistanceModel;
props->Resampler = source->Resampler;
@@ -111,7 +111,7 @@ void UpdateSourceProps(ALsource *source, ALvoice *voice, ALCcontext *context)
props->RoomRolloffFactor = source->RoomRolloffFactor;
props->DopplerFactor = source->DopplerFactor;
- std::copy_n(source->StereoPan, 2, props->StereoPan);
+ std::copy(std::begin(source->StereoPan), std::end(source->StereoPan), props->StereoPan);
props->Radius = source->Radius;