MCPcopy Create free account
hub / github.com/Cantera/cantera / resizeSingle

Function resizeSingle

src/base/SolutionArray.cpp:2094–2103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2092
2093template<class T>
2094void resizeSingle(AnyValue& extra, size_t size, const AnyValue& value)
2095{
2096 T defaultValue;
2097 if (value.is<void>()) {
2098 defaultValue = vector<T>(1)[0];
2099 } else {
2100 defaultValue = value.as<T>();
2101 }
2102 extra.asVector<T>().resize(size, defaultValue);
2103}
2104
2105template<class T>
2106void resizeMulti(AnyValue& extra, size_t size, const AnyValue& value)

Callers

nothing calls this directly

Calls 1

resizeMethod · 0.45

Tested by

no test coverage detected