From 7e85379f54292595afe296e5f0be240f6c8f7835 Mon Sep 17 00:00:00 2001 From: Markus Engel Date: Wed, 26 Feb 2014 02:08:53 +0100 Subject: Made constructors of tools use initializer lists. (bzr r13060) --- src/ui/tools/star-tool.cpp | 28 +++++++++------------------- 1 file changed, 9 insertions(+), 19 deletions(-) (limited to 'src/ui/tools/star-tool.cpp') diff --git a/src/ui/tools/star-tool.cpp b/src/ui/tools/star-tool.cpp index b5d8c4418..42010788f 100644 --- a/src/ui/tools/star-tool.cpp +++ b/src/ui/tools/star-tool.cpp @@ -69,25 +69,15 @@ const std::string& StarTool::getPrefsPath() { const std::string StarTool::prefsPath = "/tools/shapes/star"; -StarTool::StarTool() : ToolBase() { - this->randomized = 0; - this->rounded = 0; - - this->cursor_shape = cursor_star_xpm; - this->hot_x = 4; - this->hot_y = 4; - this->xp = 0; - this->yp = 0; - this->tolerance = 0; - this->within_tolerance = false; - this->item_to_select = NULL; - //this->tool_url = "/tools/shapes/star"; - - this->star = NULL; - - this->magnitude = 5; - this->proportion = 0.5; - this->isflatsided = false; +StarTool::StarTool() + : ToolBase(cursor_star_xpm, 4, 4) + , star(NULL) + , magnitude(5) + , proportion(0.5) + , isflatsided(false) + , rounded(0) + , randomized(0) +{ } void StarTool::finish() { -- cgit v1.2.3 From 3aa344e9a40d97db7cd5a89671896bab70da33a4 Mon Sep 17 00:00:00 2001 From: Markus Engel Date: Sun, 2 Mar 2014 01:31:12 +0100 Subject: Added some consts. Turned functions to member functions. (bzr r13089) --- src/ui/tools/star-tool.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ui/tools/star-tool.cpp') diff --git a/src/ui/tools/star-tool.cpp b/src/ui/tools/star-tool.cpp index 42010788f..68f998920 100644 --- a/src/ui/tools/star-tool.cpp +++ b/src/ui/tools/star-tool.cpp @@ -218,7 +218,7 @@ bool StarTool::root_handler(GdkEvent* event) { gobble_motion_events(GDK_BUTTON1_MASK); ret = TRUE; - } else if (!sp_event_context_knot_mouseover(this)) { + } else if (!this->sp_event_context_knot_mouseover()) { SnapManager &m = desktop->namedview->snap_manager; m.setup(desktop); -- cgit v1.2.3