mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-02 06:22:53 +00:00
Add static asserts to functions using MixedTyped
This makes it easier to find all the places that need to be changed
after adding a new type to MixedTyped.
Test: VtsHalNeuralnetworksV1_2TargetTest
Change-Id: I92867de6574ec6dc1a17e30d889c79501ea93063
Merged-In: I92867de6574ec6dc1a17e30d889c79501ea93063
(cherry picked from commit 9b490f4833)
This commit is contained in:
@@ -62,6 +62,8 @@ void copy_back(MixedTyped* dst, const std::vector<RequestArgument>& ra, char* sr
|
||||
copy_back_<float>(dst, ra, src);
|
||||
copy_back_<int32_t>(dst, ra, src);
|
||||
copy_back_<uint8_t>(dst, ra, src);
|
||||
static_assert(3 == std::tuple_size<MixedTyped>::value,
|
||||
"Number of types in MixedTyped changed, but copy_back function wasn't updated");
|
||||
}
|
||||
|
||||
// Top level driver for models and examples generated by test_generator.py
|
||||
|
||||
Reference in New Issue
Block a user