[glom] CanvasEditable: Remove an unused method.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom] CanvasEditable: Remove an unused method.
- Date: Fri, 5 Dec 2014 10:59:51 +0000 (UTC)
commit 62bb1a9d554de23802ab5cdf375da3ebbf1a2074
Author: Murray Cumming <murrayc murrayc com>
Date: Fri Dec 5 11:59:08 2014 +0100
CanvasEditable: Remove an unused method.
get_parent_container_or_self() is not called by anything.
Found by Coverity Scan, which identified dead code because of
an early return, not because the whole method is not used.
glom/utility_widgets/canvas/canvas_editable.cc | 12 ------------
glom/utility_widgets/canvas/canvas_editable.h | 2 --
2 files changed, 0 insertions(+), 14 deletions(-)
---
diff --git a/glom/utility_widgets/canvas/canvas_editable.cc b/glom/utility_widgets/canvas/canvas_editable.cc
index 985556a..58e99fb 100644
--- a/glom/utility_widgets/canvas/canvas_editable.cc
+++ b/glom/utility_widgets/canvas/canvas_editable.cc
@@ -139,18 +139,6 @@ void CanvasEditable::remove_all_items(const Glib::RefPtr<Goocanvas::Group>& grou
}
-//static:
-Glib::RefPtr<Goocanvas::Item> CanvasEditable::get_parent_container_or_self(const
Glib::RefPtr<Goocanvas::Item>& item)
-{
- return item;
-
- Glib::RefPtr<Goocanvas::Item> result = item;
- while(result && !result->is_container())
- result = result->get_parent();
-
- return result;
-}
-
void CanvasEditable::add_vertical_rule(double x)
{
m_grid->add_vertical_rule(x);
diff --git a/glom/utility_widgets/canvas/canvas_editable.h b/glom/utility_widgets/canvas/canvas_editable.h
index c10c1e2..74754ff 100644
--- a/glom/utility_widgets/canvas/canvas_editable.h
+++ b/glom/utility_widgets/canvas/canvas_editable.h
@@ -103,8 +103,6 @@ private:
void on_item_selected(const Glib::RefPtr<CanvasItemMovable>& item, bool group_select);
- static Glib::RefPtr<Goocanvas::Item> get_parent_container_or_self(const Glib::RefPtr<Goocanvas::Item>&
item);
-
bool m_dragging;
double m_drag_x, m_drag_y;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]