diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-09-29 10:44:22 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-09-29 10:44:22 +0200 |
commit | 6991e9b43d0954018e1a82fa4cb28af42632ae92 (patch) | |
tree | 4082eccdb747de8953f8a0812dc8111b31d90b81 /core/io/file_access.cpp | |
parent | 5bcd019ee9151b9040dc91e2aa4aef4cbbaa25fe (diff) | |
parent | ea1848ce0a5f03c3a9f7e0a221350f4f4044bb08 (diff) |
Merge pull request #66583 from bruvzg/constexpr
Use `constexpr` in the conditions with template parameters and `sizeof`s to suppress C4127 warnings.
Diffstat (limited to 'core/io/file_access.cpp')
-rw-r--r-- | core/io/file_access.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/io/file_access.cpp b/core/io/file_access.cpp index 499f083f51..cb25564342 100644 --- a/core/io/file_access.cpp +++ b/core/io/file_access.cpp @@ -548,7 +548,7 @@ void FileAccess::store_64(uint64_t p_dest) { } void FileAccess::store_real(real_t p_real) { - if (sizeof(real_t) == 4) { + if constexpr (sizeof(real_t) == 4) { store_float(p_real); } else { store_double(p_real); |