mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-09 07:35:41 +12:00
Switch if to if constexpr
This commit is contained in:
parent
a4152199d3
commit
90a88eee39
1 changed files with 1 additions and 1 deletions
|
@ -56,7 +56,7 @@ public:
|
||||||
// Adds a surface object to the cache and returns it
|
// Adds a surface object to the cache and returns it
|
||||||
SurfaceType& add(const SurfaceType& surface) {
|
SurfaceType& add(const SurfaceType& surface) {
|
||||||
if (size >= capacity) {
|
if (size >= capacity) {
|
||||||
if (evictOnOverflow) { // Do a ring buffer if evictOnOverflow is true
|
if constexpr (evictOnOverflow) { // Do a ring buffer if evictOnOverflow is true
|
||||||
auto& e = buffer[evictionIndex];
|
auto& e = buffer[evictionIndex];
|
||||||
evictionIndex = (evictionIndex + 1) % capacity;
|
evictionIndex = (evictionIndex + 1) % capacity;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue