From 10edbdc399a52958f59ee0d8b9cc216a1bcb1441 Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Sat, 28 Dec 2024 10:29:47 +1100 Subject: [PATCH] disable GCC unmath optimization in non-nearest scaling funcs --- source/core/StarImageProcessing.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/core/StarImageProcessing.cpp b/source/core/StarImageProcessing.cpp index 9f64124..d599c2c 100644 --- a/source/core/StarImageProcessing.cpp +++ b/source/core/StarImageProcessing.cpp @@ -25,6 +25,8 @@ Image scaleNearest(Image const& srcImage, Vec2F const& scale) { return destImage; } +#pragma GCC push_options +#pragma GCC optimize("-fno-unsafe-math-optimizations") Image scaleBilinear(Image const& srcImage, Vec2F const& scale) { Vec2U srcSize = srcImage.size(); Vec2U destSize = Vec2U::round(vmult(Vec2F(srcSize), scale)); @@ -100,6 +102,7 @@ Image scaleBicubic(Image const& srcImage, Vec2F const& scale) { return destImage; } +#pragma GCC pop_options StringList colorDirectivesFromConfig(JsonArray const& directives) { List result;