fix some warnings and use the damn FORCE_INLINE macro otherwise what's it there for

This commit is contained in:
SimoneN64
2023-06-05 20:54:34 +02:00
parent 776634a293
commit 32c66fdf5f
25 changed files with 139 additions and 133 deletions

View File

@@ -3,7 +3,7 @@
#include <log.hpp>
namespace Util {
inline auto ReadFileBinary(const std::string& path, u32** buf) {
FORCE_INLINE auto ReadFileBinary(const std::string& path, u32** buf) {
std::ifstream file(path, std::ios::binary);
file.unsetf(std::ios::skipws);
if(!file.is_open()) {
@@ -20,7 +20,7 @@ inline auto ReadFileBinary(const std::string& path, u32** buf) {
return size;
}
inline size_t NextPow2(size_t num) {
FORCE_INLINE size_t NextPow2(size_t num) {
// Taken from "Bit Twiddling Hacks" by Sean Anderson:
// https://graphics.stanford.edu/~seander/bithacks.html#RoundUpPowerOf2
--num;