MCPcopy Create free account
hub / github.com/PlotJuggler/PlotJuggler / normalizeSlashes

Function normalizeSlashes

pj_datastore/src/plugin_data_host.cpp:67–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65}
66
67[[nodiscard]] std::string normalizeSlashes(std::string_view name) {
68 std::string out;
69 out.reserve(name.size());
70 bool prev_slash = false;
71 for (const char c : name) {
72 if (c == '/' && prev_slash) {
73 continue;
74 }
75 prev_slash = (c == '/');
76 out.push_back(c);
77 }
78 return out;
79}
80
81[[nodiscard]] Expected<PrimitiveType> fromAbiType(PJ_primitive_type_t type) {
82 const auto raw = static_cast<uint32_t>(type);

Callers 3

ensureTopicMethod · 0.85
ensureFieldMethod · 0.85
appendRecordMethod · 0.85

Calls 2

reserveMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected