Skip to content

Commit a6d84bc

Browse files
committed
Merge pull request godotengine#97059 from Gaktan/fix_weird_msvc_compilation_error
Fix weird MSVC compilation error
2 parents b573994 + 453f32a commit a6d84bc

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

core/io/image.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -866,12 +866,10 @@ static void _scale_cubic(const uint8_t *__restrict p_src, uint8_t *__restrict p_
866866

867867
template <int CC, typename T>
868868
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) {
869-
enum {
870-
FRAC_BITS = 8,
871-
FRAC_LEN = (1 << FRAC_BITS),
872-
FRAC_HALF = (FRAC_LEN >> 1),
873-
FRAC_MASK = FRAC_LEN - 1
874-
};
869+
constexpr uint32_t FRAC_BITS = 8;
870+
constexpr uint32_t FRAC_LEN = (1 << FRAC_BITS);
871+
constexpr uint32_t FRAC_HALF = (FRAC_LEN >> 1);
872+
constexpr uint32_t FRAC_MASK = FRAC_LEN - 1;
875873

876874
for (uint32_t i = 0; i < p_dst_height; i++) {
877875
// Add 0.5 in order to interpolate based on pixel center

0 commit comments

Comments
 (0)