aboutsummaryrefslogtreecommitdiffstats
path: root/al/source.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-05-12 18:02:12 -0700
committerChris Robinson <[email protected]>2023-05-12 18:02:12 -0700
commite7ea579ca5f3c0da6cfe80ec9a7295bca60198aa (patch)
tree43e7e7d3ac1cbdbfd3705986238853eec72c272e /al/source.cpp
parent72f02418e505a192c0cc7b27cd7b3aa28a7a03ec (diff)
Avoid using al::vector unnecessarily
Diffstat (limited to 'al/source.cpp')
-rw-r--r--al/source.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/al/source.cpp b/al/source.cpp
index efe65332..1bfd5a94 100644
--- a/al/source.cpp
+++ b/al/source.cpp
@@ -42,6 +42,7 @@
#include <stdexcept>
#include <thread>
#include <utility>
+#include <vector>
#include "AL/al.h"
#include "AL/alc.h"
@@ -2659,7 +2660,7 @@ START_API_FUNC
}
else
{
- al::vector<ALuint> ids;
+ std::vector<ALuint> ids;
ids.reserve(static_cast<ALuint>(n));
do {
ALsource *source{AllocSource(context.get())};
@@ -3223,7 +3224,7 @@ START_API_FUNC
context->setError(AL_INVALID_VALUE, "Playing %d sources", n);
if(n <= 0) UNLIKELY return;
- al::vector<ALsource*> extra_sources;
+ std::vector<ALsource*> extra_sources;
std::array<ALsource*,8> source_storage;
al::span<ALsource*> srchandles;
if(static_cast<ALuint>(n) <= source_storage.size()) LIKELY
@@ -3261,7 +3262,7 @@ START_API_FUNC
if(start_time < 0) UNLIKELY
return context->setError(AL_INVALID_VALUE, "Invalid time point %" PRId64, start_time);
- al::vector<ALsource*> extra_sources;
+ std::vector<ALsource*> extra_sources;
std::array<ALsource*,8> source_storage;
al::span<ALsource*> srchandles;
if(static_cast<ALuint>(n) <= source_storage.size()) LIKELY
@@ -3301,7 +3302,7 @@ START_API_FUNC
context->setError(AL_INVALID_VALUE, "Pausing %d sources", n);
if(n <= 0) UNLIKELY return;
- al::vector<ALsource*> extra_sources;
+ std::vector<ALsource*> extra_sources;
std::array<ALsource*,8> source_storage;
al::span<ALsource*> srchandles;
if(static_cast<ALuint>(n) <= source_storage.size()) LIKELY
@@ -3377,7 +3378,7 @@ START_API_FUNC
context->setError(AL_INVALID_VALUE, "Stopping %d sources", n);
if(n <= 0) UNLIKELY return;
- al::vector<ALsource*> extra_sources;
+ std::vector<ALsource*> extra_sources;
std::array<ALsource*,8> source_storage;
al::span<ALsource*> srchandles;
if(static_cast<ALuint>(n) <= source_storage.size()) LIKELY
@@ -3440,7 +3441,7 @@ START_API_FUNC
context->setError(AL_INVALID_VALUE, "Rewinding %d sources", n);
if(n <= 0) UNLIKELY return;
- al::vector<ALsource*> extra_sources;
+ std::vector<ALsource*> extra_sources;
std::array<ALsource*,8> source_storage;
al::span<ALsource*> srchandles;
if(static_cast<ALuint>(n) <= source_storage.size()) LIKELY