Fixing warnings and style.

This commit is contained in:
Ben Vanik
2015-05-09 18:13:19 -07:00
parent 5954d23438
commit 21edd65354
10 changed files with 27 additions and 30 deletions

View File

@@ -24,17 +24,17 @@ class MenuItem {
typedef std::unique_ptr<MenuItem, void (*)(MenuItem*)> MenuItemPtr;
enum class Type {
kPopup, // Popup menu (submenu)
kPopup, // Popup menu (submenu)
kSeparator,
kNormal, // Root menu
kString, // Menu is just a string
kNormal, // Root menu
kString, // Menu is just a string
};
virtual ~MenuItem();
MenuItem* parent_item() const { return parent_item_; }
Type type() { return type_; }
const std::wstring &text() { return text_; }
const std::wstring& text() { return text_; }
void AddChild(MenuItem* child_item);
void AddChild(std::unique_ptr<MenuItem> child_item);
@@ -45,7 +45,7 @@ class MenuItem {
protected:
MenuItem(Type type);
MenuItem(Type type, const std::wstring &text);
MenuItem(Type type, const std::wstring& text);
virtual void OnChildAdded(MenuItem* child_item) {}
virtual void OnChildRemoved(MenuItem* child_item) {}
@@ -55,7 +55,7 @@ class MenuItem {
Type type_;
MenuItem* parent_item_;
std::vector<MenuItemPtr> children_;
std::wstring text_; // Text associated with this item (typically the title)
std::wstring text_; // Text associated with this item (typically the title)
};
} // namespace ui