| 37 | } |
| 38 | |
| 39 | std::string ResourceId::toAbsolutePath() const { |
| 40 | if (bundleName.isEmpty()) { |
| 41 | return resourcePath.slowToString(); |
| 42 | } |
| 43 | |
| 44 | std::string out; |
| 45 | out.reserve(bundleName.length() + resourcePath.length() + 1); |
| 46 | out.append(bundleName.toStringView()); |
| 47 | out += '/'; |
| 48 | out.append(resourcePath.toStringView()); |
| 49 | |
| 50 | return out; |
| 51 | } |
| 52 | |
| 53 | std::ostream& operator<<(std::ostream& os, const ResourceId& d) noexcept { |
| 54 | return os << d.toAbsolutePath(); |
no test coverage detected