MCPcopy Create free account
hub / github.com/comaps/comaps / FromStringArray

Function FromStringArray

libs/platform/settings.cpp:63–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61{
62template <class T, size_t N>
63bool FromStringArray(string const & s, T (&arr)[N])
64{
65 std::istringstream in(s);
66 size_t count = 0;
67 while (count < N && in >> arr[count])
68 {
69 if (!math::is_finite(arr[count]))
70 return false;
71 ++count;
72 }
73
74 return (!in.fail() && count == N);
75}
76} // namespace impl
77
78template <>

Callers 2

AnyRectD>Method · 0.85
RectD>Method · 0.85

Calls 1

is_finiteFunction · 0.85

Tested by

no test coverage detected