From 379ec5846ffa216a32201da1c363f45f9e73c1ce Mon Sep 17 00:00:00 2001 From: "Zed A. Shaw" Date: Sat, 18 Jan 2025 11:14:00 -0500 Subject: [PATCH] Brought in a fix suggested by Amit but still didn't improve perf. I'll use that to see how Tracy works. --- amt/pixel.hpp | 11 +++++++++-- amt/raycaster.cpp | 1 + 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/amt/pixel.hpp b/amt/pixel.hpp index 3bbefa8..6a96e71 100644 --- a/amt/pixel.hpp +++ b/amt/pixel.hpp @@ -62,8 +62,15 @@ namespace amt { constexpr RGBA() noexcept = default; constexpr RGBA(RGBA const&) noexcept = default; constexpr RGBA(RGBA &&) noexcept = default; - constexpr RGBA& operator=(RGBA const& other) noexcept = default; - constexpr RGBA& operator=(RGBA && other) noexcept = default; + constexpr RGBA& operator=(RGBA const& other) noexcept { + this->m_data.color = other.m_data.color; + return *this; + } + constexpr RGBA& operator=(RGBA && other) noexcept { + this->m_data.color = other.m_data.color; + return *this; + } + constexpr ~RGBA() noexcept = default; diff --git a/amt/raycaster.cpp b/amt/raycaster.cpp index 852a4e4..254e975 100644 --- a/amt/raycaster.cpp +++ b/amt/raycaster.cpp @@ -3,6 +3,7 @@ #include "amt/pixel.hpp" #include "constants.hpp" +#define AMT_LIGHT using namespace fmt;