mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 16:50:18 +00:00
Snap for 6864616 from bfaf79c9c6 to rvc-qpr1-release
Change-Id: If8dd6ae00abe5ce9fb396541594466470c76a22f
This commit is contained in:
@@ -141,11 +141,6 @@ Result<void> parseUserAssociations(const hidl_vec<int32_t>& int32Values, size_t
|
||||
template <typename T>
|
||||
Result<T> verifyAndCast(int32_t value) {
|
||||
T castValue = static_cast<T>(value);
|
||||
const auto iter = hidl_enum_range<T>();
|
||||
if (castValue < *iter.begin() || castValue > *std::prev(iter.end())) {
|
||||
return Error() << "Value " << value << " not in range [" << toString(*iter.begin()) << ", "
|
||||
<< toString(*std::prev(iter.end())) << "]";
|
||||
}
|
||||
for (const auto& v : hidl_enum_range<T>()) {
|
||||
if (castValue == v) {
|
||||
return castValue;
|
||||
|
||||
Reference in New Issue
Block a user