Skip to content

Commit

Permalink
Return a span instead of a reference to a vector
Browse files Browse the repository at this point in the history
  • Loading branch information
kcat committed Jul 8, 2024
1 parent c671477 commit ba93e7f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/dsoundoal.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <bitset>
#include <condition_variable>
#include <mutex>
#include <span>
#include <thread>
#include <type_traits>
#include <vector>
Expand Down Expand Up @@ -227,7 +228,7 @@ class DSound8OAL final : IDirectSound8 {
PrimaryBuffer &getPrimary() noexcept { return mPrimaryBuffer; }

[[nodiscard]]
std::vector<Buffer*> &get3dBuffers() noexcept { return m3dBuffers; }
auto get3dBuffers() noexcept -> std::span<Buffer*> { return m3dBuffers; }

template<typename T> [[nodiscard]]
T as() noexcept
Expand Down

0 comments on commit ba93e7f

Please sign in to comment.