The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

a/math: Resolve warnings.

+12 -16
+4 -4
src/xrt/auxiliary/math/m_relation_history.cpp
··· 132 132 133 133 // We precede *it and follow *(it - 1) (which we know exists because we already handled 134 134 // the it = begin() case) 135 - auto predecessor = *(it - 1); 136 - auto successor = *it; 135 + const auto &predecessor = *(it - 1); 136 + const auto &successor = *it; 137 137 138 138 // Do the thing. 139 139 int64_t diff_before = static_cast<int64_t>(at_timestamp_ns) - predecessor.timestamp; ··· 187 187 return false; 188 188 }; 189 189 190 - float dt = time_ns_to_s(timestamp - last_time_ns); 190 + float dt = (float)time_ns_to_s(timestamp - last_time_ns); 191 191 192 192 // Used to find out what values are valid in both the old relation and the new relation 193 193 enum xrt_space_relation_flags tmp_flags = ··· 245 245 m_relation_history_clear(struct m_relation_history *rh) 246 246 { 247 247 std::unique_lock<os::Mutex> lock(rh->mutex); 248 - rh->impl = {}; 248 + rh->impl.clear(); 249 249 } 250 250 251 251 void
+8 -12
src/xrt/auxiliary/math/m_space.h
··· 36 36 { 37 37 struct xrt_pose p = *pose; 38 38 39 - if ((p.position.x == 0.0f || p.position.x == -0.0f) && // x 40 - (p.position.y == 0.0f || p.position.y == -0.0f) && // y 41 - (p.position.z == 0.0f || p.position.z == -0.0f) && // z 42 - (p.orientation.x == 0.0f || p.orientation.x == -0.0f) && // x 43 - (p.orientation.y == 0.0f || p.orientation.y == -0.0f) && // y 44 - (p.orientation.z == 0.0f || p.orientation.z == -0.0f) && // z 45 - (p.orientation.w == 1.0f || p.orientation.w == -1.0f) // w 46 - ) { 47 - return true; 48 - } 49 - 50 - return false; 39 + return ((p.position.x == 0.0f || p.position.x == -0.0f) && // x 40 + (p.position.y == 0.0f || p.position.y == -0.0f) && // y 41 + (p.position.z == 0.0f || p.position.z == -0.0f) && // z 42 + (p.orientation.x == 0.0f || p.orientation.x == -0.0f) && // x 43 + (p.orientation.y == 0.0f || p.orientation.y == -0.0f) && // y 44 + (p.orientation.z == 0.0f || p.orientation.z == -0.0f) && // z 45 + (p.orientation.w == 1.0f || p.orientation.w == -1.0f) // w 46 + ); 51 47 } 52 48 53 49