diff --git a/include/mitsuba/core/octree.h b/include/mitsuba/core/octree.h index fa9f6b85..4c25abe9 100644 --- a/include/mitsuba/core/octree.h +++ b/include/mitsuba/core/octree.h @@ -175,7 +175,7 @@ protected: uint32_t *temp, uint32_t *start, uint32_t *end) { if (start == end) { return NULL; - } else if (end-start < m_maxItems || depth > m_maxDepth) { + } else if ((uint32_t) (end-start) < m_maxItems || depth > m_maxDepth) { OctreeNode *result = new OctreeNode(); result->count = (uint32_t) (end-start); result->offset = (uint32_t) (start-base); diff --git a/src/utils/tonemap.cpp b/src/utils/tonemap.cpp index 10066db8..f16d3833 100644 --- a/src/utils/tonemap.cpp +++ b/src/utils/tonemap.cpp @@ -93,9 +93,9 @@ public: angle = radToDeg(std::atan(r * halfLength)), tmp = angle + 0.02f, f0 = 2.61e6f * math::fastexp(-2500*angle*angle), - f1 = 20.91 / (tmp*tmp*tmp), - f2 = 72.37 / (tmp*tmp), - f = 0.384f*f0 + 0.478*f1 + 0.138*f2; + f1 = 20.91f / (tmp*tmp*tmp), + f2 = 72.37f / (tmp*tmp), + f = 0.384f*f0 + 0.478f*f1 + 0.138f*f2; *ptr++ = f; sum += f;