input: handle change in std::span::size type

The pre-standardized version of std::span in external/libcxx had a
ptrdiff_t size, but the finalized std::span has a size_t size instead.
Also, the std::span::index_type typedef is renamed to size_type. Use an
old-style constructor call to implicitly coerce the size value to the
proper type.

Insert a cast to avoid a signedness comparison warning.

Bug: b/175635923
Test: treehugger
Change-Id: I96ccf6d5b54d4118b096f97c901073b4fc2f6f9f
diff --git a/libs/input/TfLiteMotionPredictor.cpp b/libs/input/TfLiteMotionPredictor.cpp
index 5984b4d3..d17476e 100644
--- a/libs/input/TfLiteMotionPredictor.cpp
+++ b/libs/input/TfLiteMotionPredictor.cpp
@@ -143,8 +143,7 @@
                         tensor->name, TfLiteTypeGetName(tensor->type), TfLiteTypeGetName(type));
 
     LOG_ALWAYS_FATAL_IF(!tensor->data.data);
-    return {reinterpret_cast<T*>(tensor->data.data),
-            static_cast<typename std::span<T>::index_type>(tensor->bytes / sizeof(T))};
+    return std::span<T>(reinterpret_cast<T*>(tensor->data.data), tensor->bytes / sizeof(T));
 }
 
 // Verifies that a tensor exists and has an underlying buffer of type T.