| 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); |
no test coverage detected