From 1258ddc78fb2c98b445ae339ffbd8af3cb01c354 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sat, 17 Sep 2022 18:17:57 +0200 Subject: [PATCH] Fixed some compiler errors on older GCC versions. --- es-core/src/components/primary/CarouselComponent.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/es-core/src/components/primary/CarouselComponent.h b/es-core/src/components/primary/CarouselComponent.h index 958934c5f..dcfe8d1bf 100644 --- a/es-core/src/components/primary/CarouselComponent.h +++ b/es-core/src/components/primary/CarouselComponent.h @@ -34,8 +34,6 @@ protected: using List::mWindow; using GuiComponent::mDefaultZIndex; - using GuiComponent::mOrigin; - using GuiComponent::mPosition; using GuiComponent::mZIndex; public: @@ -507,11 +505,12 @@ template void CarouselComponent::render(const glm::mat4& parentT return; glm::mat4 carouselTrans {parentTrans}; - carouselTrans = - glm::translate(carouselTrans, glm::round(glm::vec3 {mPosition.x, mPosition.y, 0.0f})); carouselTrans = glm::translate( carouselTrans, - glm::round(glm::vec3 {mOrigin.x * mSize.x * -1.0f, mOrigin.y * mSize.y * -1.0f, 0.0f})); + glm::round(glm::vec3 {GuiComponent::mPosition.x, GuiComponent::mPosition.y, 0.0f})); + carouselTrans = glm::translate( + carouselTrans, glm::round(glm::vec3 {GuiComponent::mOrigin.x * mSize.x * -1.0f, + GuiComponent::mOrigin.y * mSize.y * -1.0f, 0.0f})); mRenderer->pushClipRect( glm::ivec2 {static_cast(glm::clamp(std::round(carouselTrans[3].x), 0.0f, @@ -756,8 +755,8 @@ void CarouselComponent::applyTheme(const std::shared_ptr& theme, mSize.x = Renderer::getScreenWidth(); mSize.y = Renderer::getScreenHeight() * 0.23240f; - mPosition.x = 0.0f; - mPosition.y = Renderer::getScreenHeight() * 0.38378f; + GuiComponent::mPosition.x = 0.0f; + GuiComponent::mPosition.y = Renderer::getScreenHeight() * 0.38378f; mCarouselColor = 0xFFFFFFD8; mCarouselColorEnd = 0xFFFFFFD8; mZIndex = mDefaultZIndex;