From 2fe83ce15463bf9197dc6736e802caddace67ed0 Mon Sep 17 00:00:00 2001 From: Marc Gilleron Date: Sun, 19 Jan 2020 01:22:48 +0000 Subject: [PATCH] Fix wrong return values --- util/utility.h | 2 +- voxel_buffer.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/util/utility.h b/util/utility.h index 01af6766..a774181a 100644 --- a/util/utility.h +++ b/util/utility.h @@ -88,7 +88,7 @@ inline float min(const float &a, const float &b) { } template -inline float max(const T a, const T b) { +inline T max(const T a, const T b) { return a > b ? a : b; } diff --git a/voxel_buffer.cpp b/voxel_buffer.cpp index 47705693..8ab5ebed 100644 --- a/voxel_buffer.cpp +++ b/voxel_buffer.cpp @@ -88,7 +88,7 @@ inline uint64_t real_to_raw_voxel(real_t value, VoxelBuffer::Depth depth) { } } -inline uint64_t raw_voxel_to_real(uint64_t value, VoxelBuffer::Depth depth) { +inline real_t raw_voxel_to_real(uint64_t value, VoxelBuffer::Depth depth) { // Depths below 32 are normalized between -1 and 1 switch (depth) { case VoxelBuffer::DEPTH_1_BIT: