summaryrefslogtreecommitdiffstats
path: root/core/io/image.cpp
diff options
context:
space:
mode:
authorThaddeus Crews <repiteo@outlook.com>2024-03-07 20:29:49 -0600
committerThaddeus Crews <repiteo@outlook.com>2024-03-07 22:39:09 -0600
commit9903e6779b70fc03aae70a37b9cf053f4f355b91 (patch)
tree16ee7fbb98471ff6b4f3ea97e9a9389ae33282ea /core/io/image.cpp
parentaef11a14274f6f9e74ad91ead1d7c07ea1dd7f5f (diff)
downloadredot-engine-9903e6779b70fc03aae70a37b9cf053f4f355b91.tar.gz
Enforce template syntax `typename` over `class`
Diffstat (limited to 'core/io/image.cpp')
-rw-r--r--core/io/image.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/io/image.cpp b/core/io/image.cpp
index b094290ac8..c454f06d67 100644
--- a/core/io/image.cpp
+++ b/core/io/image.cpp
@@ -679,7 +679,7 @@ static double _bicubic_interp_kernel(double x) {
return bc;
}
-template <int CC, class T>
+template <int CC, typename T>
static void _scale_cubic(const uint8_t *__restrict p_src, uint8_t *__restrict p_dst, uint32_t p_src_width, uint32_t p_src_height, uint32_t p_dst_width, uint32_t p_dst_height) {
// get source image size
int width = p_src_width;
@@ -766,7 +766,7 @@ static void _scale_cubic(const uint8_t *__restrict p_src, uint8_t *__restrict p_
}
}
-template <int CC, class T>
+template <int CC, typename T>
static void _scale_bilinear(const uint8_t *__restrict p_src, uint8_t *__restrict p_dst, uint32_t p_src_width, uint32_t p_src_height, uint32_t p_dst_width, uint32_t p_dst_height) {
enum {
FRAC_BITS = 8,
@@ -856,7 +856,7 @@ static void _scale_bilinear(const uint8_t *__restrict p_src, uint8_t *__restrict
}
}
-template <int CC, class T>
+template <int CC, typename T>
static void _scale_nearest(const uint8_t *__restrict p_src, uint8_t *__restrict p_dst, uint32_t p_src_width, uint32_t p_src_height, uint32_t p_dst_width, uint32_t p_dst_height) {
for (uint32_t i = 0; i < p_dst_height; i++) {
uint32_t src_yofs = i * p_src_height / p_dst_height;
@@ -883,7 +883,7 @@ static float _lanczos(float p_x) {
return Math::abs(p_x) >= LANCZOS_TYPE ? 0 : Math::sincn(p_x) * Math::sincn(p_x / LANCZOS_TYPE);
}
-template <int CC, class T>
+template <int CC, typename T>
static void _scale_lanczos(const uint8_t *__restrict p_src, uint8_t *__restrict p_dst, uint32_t p_src_width, uint32_t p_src_height, uint32_t p_dst_width, uint32_t p_dst_height) {
int32_t src_width = p_src_width;
int32_t src_height = p_src_height;
@@ -1665,7 +1665,7 @@ bool Image::_can_modify(Format p_format) const {
return p_format <= FORMAT_RGBE9995;
}
-template <class Component, int CC, bool renormalize,
+template <typename Component, int CC, bool renormalize,
void (*average_func)(Component &, const Component &, const Component &, const Component &, const Component &),
void (*renormalize_func)(Component *)>
static void _generate_po2_mipmap(const Component *p_src, Component *p_dst, uint32_t p_width, uint32_t p_height) {