| 172 | } |
| 173 | |
| 174 | Bunit parseBUnit(const std::wstring& str) |
| 175 | { |
| 176 | std::wstring wstr = to_upper_copy(str); |
| 177 | |
| 178 | if (wstr == L"B") |
| 179 | return BunitB; |
| 180 | if (wstr == L"KB") |
| 181 | return BunitkB; |
| 182 | if (wstr == L"MB") |
| 183 | return BunitMB; |
| 184 | if (wstr == L"GB") |
| 185 | return BunitGB; |
| 186 | if (wstr == L"TB") |
| 187 | return BunitTB; |
| 188 | |
| 189 | throw std::invalid_argument("Unknown unit type"); |
| 190 | } |
| 191 | |
| 192 | std::wstring BunitStr(const Bunit& unit) |
| 193 | { |
no outgoing calls
no test coverage detected