From 7ef9a01d245bdc03b6c89cdccda915d232e0ba3b Mon Sep 17 00:00:00 2001 From: Chris Galvan Date: Wed, 26 Jan 2022 10:16:31 -0600 Subject: [PATCH] Fixed compile issue on Linux Signed-off-by: Chris Galvan --- .../RPI.Reflect/Image/StreamingImageAsset.cpp | 45 +++---------------- 1 file changed, 6 insertions(+), 39 deletions(-) diff --git a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Image/StreamingImageAsset.cpp b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Image/StreamingImageAsset.cpp index dc9f0bbaa6..a3cfc581b6 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Image/StreamingImageAsset.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Image/StreamingImageAsset.cpp @@ -93,42 +93,6 @@ namespace AZ AZ::u16 h; }; - template - float RetrieveFloatValue(const AZ::u8* mem, size_t index) - { - static_assert(false, "Unsupported pixel format"); - } - - template - AZ::u32 RetrieveUintValue(const AZ::u8* mem, size_t index) - { - static_assert(false, "Unsupported pixel format"); - } - - template - AZ::s32 RetrieveIntValue(const AZ::u8* mem, size_t index) - { - static_assert(false, "Unsupported pixel format"); - } - - template <> - float RetrieveFloatValue([[maybe_unused]] const AZ::u8* mem, [[maybe_unused]] size_t index) - { - return 0.0f; - } - - template <> - AZ::u32 RetrieveUintValue([[maybe_unused]] const AZ::u8* mem, [[maybe_unused]] size_t index) - { - return 0; - } - - template <> - AZ::s32 RetrieveIntValue([[maybe_unused]] const AZ::u8* mem, [[maybe_unused]] size_t index) - { - return 0; - } - float ScaleValue(float value, float origMin, float origMax, float scaledMin, float scaledMax) { return ((value - origMin) / (origMax - origMin)) * (scaledMax - scaledMin) + scaledMin; @@ -180,7 +144,8 @@ namespace AZ return actualMem[index]; } default: - return RetrieveFloatValue(mem, index); + AZ_Assert(false, "Unsupported pixel format"); + return 0.0f; } } @@ -203,7 +168,8 @@ namespace AZ return actualMem[index]; } default: - return RetrieveUintValue(mem, index); + AZ_Assert(false, "Unsupported pixel format"); + return 0; } } @@ -226,7 +192,8 @@ namespace AZ return actualMem[index]; } default: - return RetrieveIntValue(mem, index); + AZ_Assert(false, "Unsupported pixel format"); + return 0; } } }