Fix the compiler error for the ternary operator, caused by Eigen rebase.
Bug: 34161771
Test: build
Change-Id: I3c0c1b3667a3d1f56052b247c94c6255e9e12004
diff --git a/libs/vr/libposepredictor/predictor.cpp b/libs/vr/libposepredictor/predictor.cpp
index 266e7ef..4d2eafd 100644
--- a/libs/vr/libposepredictor/predictor.cpp
+++ b/libs/vr/libposepredictor/predictor.cpp
@@ -8,7 +8,7 @@
const auto delta_q = b.inverse() * a;
// Check that delta_q.w() == 1, Eigen doesn't respect this convention. If
// delta_q.w() == -1, we'll get the opposite velocity.
- return 2.0 * (delta_q.w() < 0 ? -delta_q.vec() : delta_q.vec()) / delta_time;
+ return 2.0 * (delta_q.w() < 0 ? static_cast<vec3>(-delta_q.vec()) : delta_q.vec()) / delta_time;
}
Velocity Predictor::PredictVelocity(int64_t time_ns) const {