Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(222)

Unified Diff: ui/gfx/vector_icon_types.h

Issue 2618403002: Reland crrev.com/8283cad74e0cad4840d1f with fix for static initializers. (Closed)
Patch Set: re-up Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/gfx/vector_icon_types.h
diff --git a/ui/gfx/vector_icon_types.h b/ui/gfx/vector_icon_types.h
index 8def67d2fcc7899a2cb28daa6242e2d8533f4728..e8217e6ae36970d1ee399674e0ec19c6f99e6c1f 100644
--- a/ui/gfx/vector_icon_types.h
+++ b/ui/gfx/vector_icon_types.h
@@ -64,8 +64,8 @@ enum CommandType {
// A POD that describes either a path command or an argument for it.
struct PathElement {
- PathElement(CommandType value) : type(value) {}
- PathElement(SkScalar value) : arg(value) {}
+ constexpr PathElement(CommandType value) : type(value) {}
+ constexpr PathElement(SkScalar value) : arg(value) {}
union {
CommandType type;
@@ -74,14 +74,10 @@ struct PathElement {
};
struct VectorIcon {
- VectorIcon() : path_(nullptr), path_1x_(nullptr) {}
- VectorIcon(gfx::PathElement* path, gfx::PathElement* path_1x)
- : path_(path), path_1x_(path_1x) {}
-
bool is_empty() const { return !path_; }
- gfx::PathElement* path_;
- gfx::PathElement* path_1x_;
+ const gfx::PathElement* path_;
+ const gfx::PathElement* path_1x_;
};
// Returns an array of path commands and arguments, terminated by END.

Powered by Google App Engine
This is Rietveld 408576698