From c88ab423d3c2b393b72503b4e1aaece6bf9668bb Mon Sep 17 00:00:00 2001 From: wheremyfoodat <44909372+wheremyfoodat@users.noreply.github.com> Date: Sun, 9 Jul 2023 01:44:25 +0300 Subject: [PATCH] doormat --- include/renderer_gl/surface_cache.hpp | 2 +- include/renderer_gl/surfaces.hpp | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/include/renderer_gl/surface_cache.hpp b/include/renderer_gl/surface_cache.hpp index 44580fef..b2e5cc29 100644 --- a/include/renderer_gl/surface_cache.hpp +++ b/include/renderer_gl/surface_cache.hpp @@ -59,7 +59,7 @@ public: if constexpr (evictOnOverflow) { // Do a ring buffer if evictOnOverflow is true if constexpr (std::is_same() || std::is_same()) { Helpers::panicDev("Colour/Depth buffer cache overflowed, currently stubbed to do a ring-buffer. This might snap in half"); - } + } auto& e = buffer[evictionIndex]; evictionIndex = (evictionIndex + 1) % capacity; diff --git a/include/renderer_gl/surfaces.hpp b/include/renderer_gl/surfaces.hpp index ac4aa5b6..1d46e28e 100644 --- a/include/renderer_gl/surfaces.hpp +++ b/include/renderer_gl/surfaces.hpp @@ -58,13 +58,13 @@ struct ColourBuffer { } void free() { - valid = false; + valid = false; - if (texture.exists() || fbo.exists()) { - texture.free(); - fbo.free(); - } - } + if (texture.exists() || fbo.exists()) { + texture.free(); + fbo.free(); + } + } bool matches(ColourBuffer& other) { return location == other.location && format == other.format && @@ -131,10 +131,10 @@ struct DepthBuffer { void free() { valid = false; - if (texture.exists()) { - texture.free(); - } - } + if (texture.exists()) { + texture.free(); + } + } bool matches(DepthBuffer& other) { return location == other.location && format == other.format &&