FastLED 3.10.8
Loading...
Searching...
No Matches

◆ size()

size_t fl::json_value::size ( ) const
inline

Definition at line 1508 of file types.h.

1508 {
1509 // FastLED #3235 Tier 2E Phase 1: replace `SizeVisitor` +
1510 // `data.visit(visitor)` with direct `data.ptr<T>()` tag
1511 // checks. Same behavior, no per-(T × SizeVisitor) `visit_fn`
1512 // thunk instantiation.
1513 if (auto* arr = data.template ptr<json_array>()) return arr->size();
1514 if (auto* obj = data.template ptr<json_object>()) return obj->size();
1515 if (auto* v = data.template ptr<fl::vector<i16>>()) return v->size();
1516 if (auto* v = data.template ptr<fl::vector<u8>>()) return v->size();
1517 if (auto* v = data.template ptr<fl::vector<float>>()) return v->size();
1518 return 0;
1519 }
variant_t data
Definition types.h:760

References data, and fl::FL_NO_EXCEPT.

Referenced by end_array(), end_array(), and fl::json_value::array_iterator< T >::get_value().

+ Here is the caller graph for this function: