Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d0fe1d3

Browse files
committed
Suppress some clang warnings.
1 parent f856161 commit d0fe1d3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tiny_obj_loader.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1607,15 +1607,15 @@ static bool exportGroupsToShape(shape_t *shape, const PrimGroup &prim_group,
16071607
continue;
16081608
}
16091609
//Negative is to flip the normal to the correct direction
1610-
real_t inv_length = -1.0f / length_n;
1610+
real_t inv_length = -real_t(1.0) / length_n;
16111611
n.x *= inv_length;
16121612
n.y *= inv_length;
16131613
n.z *= inv_length;
16141614

16151615
TinyObjPoint axis_w, axis_v, axis_u;
16161616
axis_w = n;
16171617
TinyObjPoint a;
1618-
if(abs(axis_w.x) > 0.9999999) {
1618+
if(std::abs(axis_w.x) > real_t(0.9999999)) {
16191619
a = TinyObjPoint(0,1,0);
16201620
} else {
16211621
a = TinyObjPoint(1,0,0);

0 commit comments

Comments
 (0)