diff --git a/stratosphere/libstratosphere/include/stratosphere/sf/sf_buffers.hpp b/stratosphere/libstratosphere/include/stratosphere/sf/sf_buffers.hpp index 9497d1707..01f096408 100644 --- a/stratosphere/libstratosphere/include/stratosphere/sf/sf_buffers.hpp +++ b/stratosphere/libstratosphere/include/stratosphere/sf/sf_buffers.hpp @@ -96,8 +96,9 @@ namespace ams::sf { return this->pas.GetAddress(); } - constexpr size_t GetSizeImpl() const { - return this->pas.GetSize(); + template + constexpr inline size_t GetSizeImpl() const { + return this->pas.GetSize() / sizeof(Entry); } public: constexpr BufferBase() : pas() { /* ... */ } @@ -153,7 +154,7 @@ namespace ams::sf { } constexpr size_t GetSize() const { - return this->GetSizeImpl(); + return this->GetSizeImpl(); } }; @@ -177,7 +178,7 @@ namespace ams::sf { } constexpr size_t GetSize() const { - return this->GetSizeImpl(); + return this->GetSizeImpl(); } }; @@ -200,7 +201,7 @@ namespace ams::sf { } constexpr size_t GetSize() const { - return this->GetSizeImpl(); + return this->GetSizeImpl(); } constexpr const T &operator[](size_t i) const { @@ -227,7 +228,7 @@ namespace ams::sf { } constexpr size_t GetSize() const { - return this->GetSizeImpl(); + return this->GetSizeImpl(); } constexpr T &operator[](size_t i) const {