MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Falcor / vecToJson

Function vecToJson

Source/Falcor/Utils/Properties.cpp:41–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39{
40template<typename VecT>
41json vecToJson(const VecT& vec)
42{
43 auto constexpr length = VecT::length();
44 auto j = json::array();
45 for (size_t i = 0; i < length; ++i)
46 j.push_back(vec[i]);
47 return j;
48}
49
50template<typename T>
51json valueToJson(const T& value)

Callers 1

valueToJsonFunction · 0.85

Calls 2

lengthFunction · 0.50
push_backMethod · 0.45

Tested by

no test coverage detected