Chromium Code Reviews| Index: ui/gfx/paint_vector_icon.cc |
| diff --git a/ui/gfx/paint_vector_icon.cc b/ui/gfx/paint_vector_icon.cc |
| index c6a2620d71cffbd05579324234772f50aeae9d68..24543f59b515c51a16794adf866941e24205ba3b 100644 |
| --- a/ui/gfx/paint_vector_icon.cc |
| +++ b/ui/gfx/paint_vector_icon.cc |
| @@ -57,7 +57,7 @@ CommandType CommandFromString(const std::string& source) { |
| RETURN_IF_IS(END); |
| #undef RETURN_IF_IS |
| - NOTREACHED(); |
| + NOTREACHED() << "Unrecognized command: " << source; |
| return CLOSE; |
| } |
| @@ -67,8 +67,11 @@ std::vector<PathElement> PathFromSource(const std::string& source) { |
| source, "\n ,f", base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY); |
| for (const auto& piece : pieces) { |
| double value; |
| + int hex_value; |
|
msw
2016/07/14 20:57:02
nit: init to 0; ditto above.
|
| if (base::StringToDouble(piece, &value)) |
| path.push_back(PathElement(SkDoubleToScalar(value))); |
| + else if (base::HexStringToInt(piece, &hex_value)) |
| + path.push_back(PathElement(SkIntToScalar(hex_value))); |
| else |
| path.push_back(PathElement(CommandFromString(piece))); |
| } |