MCPcopy Create free account
hub / github.com/cwida/FastLanes / print_arr

Function print_arr

src/printer/to_str.cpp:20–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18 } else {
19 std::stringstream ss;
20 ss << "[";
21 for (size_t i {0}; i < c; ++i) {
22 ss << std::to_string(p[i]);
23 if (i != c - 1) { ss << " "; };
24 }
25 ss << "]";
26 return ss.str();
27 }
28 return {};
29}
30
31std::string ToStr::to_str(Buf& buffer_builder) {
32 return print_arr<uint32_t>(reinterpret_cast<const uint32_t*>(buffer_builder.data()), CFG::LOG::MAX);
33}
34std::string ToStr::to_str(ep_arr& ep_arr) { return print_arr<uint32_t>(ep_arr.arr, ep_arr.m_arr_c); }
35
36std::string ToStr::to_str(off_arr& off_arr) { return print_arr<uint32_t>(off_arr.arr, off_arr.arr_c()); }
37
38std::string ToStr::to_str(Page& page) {
39 return print_arr<uint32_t>(reinterpret_cast<const uint32_t*>(page.start_p), CFG::LOG::MAX);

Callers

nothing calls this directly

Calls 2

to_stringFunction · 0.50
strMethod · 0.45

Tested by

no test coverage detected