Collapse runs of '/' into a single '/' in a topic/field name. Plugin-supplied names are opaque, but an empty '/'-segment ("//") carries no meaning in the curve hierarchy, so we normalize it here — the one boundary every DataSource/Parser name crosses to become a datastore key — so the stored key, the UI catalog (which reads the descriptor name) and the by-name transform resolver all agree on a sin
| 55 | // the descriptor name) and the by-name transform resolver all agree on a single slash. |
| 56 | // Common case (no "//") allocates nothing: callers guard on `needsSlashNormalization`. |
| 57 | [[nodiscard]] bool needsSlashNormalization(std::string_view name) { |
| 58 | return name.find("//") != std::string_view::npos; |
| 59 | } |
| 60 | |
| 61 | // A field also needs work if it starts with '/' (a leading slash would double up at |
| 62 | // the "topic/field" junction), not just when it has internal "//". |
no test coverage detected