We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6215c4b commit e79b867Copy full SHA for e79b867
src/viam/examples/modules/complex/summation/impl.cpp
@@ -17,11 +17,8 @@ bool find_subtract(ResourceConfig cfg) {
17
if (subtract == cfg.attributes().end()) {
18
return false;
19
}
20
- const bool* const subtract_bool = subtract->second.get<bool>();
21
- if (!subtract_bool) {
22
- return false;
23
- }
24
- return *subtract_bool;
+
+ return subtract->second.is_a<bool>() && subtract->second.get_unchecked<bool>();
25
26
27
void MySummation::reconfigure(const Dependencies& deps, const ResourceConfig& cfg) {
0 commit comments