[glom] CanvasPrintLayout: Remove unused method overload.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom] CanvasPrintLayout: Remove unused method overload.
- Date: Sun, 7 Aug 2011 07:14:24 +0000 (UTC)
commit 88906f2aeaaefd938e7445e812511899487a9284
Author: Murray Cumming <murrayc murrayc com>
Date: Sat Aug 6 14:29:09 2011 +0200
CanvasPrintLayout: Remove unused method overload.
* glom/print_layout/canvas_print_layout.[h|cc]: get_selected_items():
The const overload is not used so remove it.
ChangeLog | 7 +++++++
glom/print_layout/canvas_print_layout.cc | 14 --------------
glom/print_layout/canvas_print_layout.h | 3 ---
3 files changed, 7 insertions(+), 17 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 608b675..0a1c776 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2011-08-06 Murray Cumming <murrayc murrayc com>
+ CanvasPrintLayout: Remove unused method overload.
+
+ * glom/print_layout/canvas_print_layout.[h|cc]: get_selected_items():
+ The const overload is not used so remove it.
+
+2011-08-06 Murray Cumming <murrayc murrayc com>
+
Print Layout: Cache the selected item.
* glom/mode_design/print_layouts/window_print_layout_edit.[h|cc]:
diff --git a/glom/print_layout/canvas_print_layout.cc b/glom/print_layout/canvas_print_layout.cc
index 91ad6e3..91b27fc 100644
--- a/glom/print_layout/canvas_print_layout.cc
+++ b/glom/print_layout/canvas_print_layout.cc
@@ -895,18 +895,4 @@ Canvas_PrintLayout::type_vec_items Canvas_PrintLayout::get_selected_items()
return result;
}
-Canvas_PrintLayout::type_vec_const_items Canvas_PrintLayout::get_selected_items() const
-{
- //TODO: This is inefficient.
- //We copy the vector items just to make them const.
- Canvas_PrintLayout* unconst_this = const_cast<Canvas_PrintLayout*>(this);
- const type_vec_items unconst_result = unconst_this->get_selected_items();
-
- type_vec_const_items result;
- result.insert(result.begin(),
- unconst_result.begin(), unconst_result.end());
-
- return result;
-}
-
} //namespace Glom
diff --git a/glom/print_layout/canvas_print_layout.h b/glom/print_layout/canvas_print_layout.h
index 0fa3811..b3194dc 100644
--- a/glom/print_layout/canvas_print_layout.h
+++ b/glom/print_layout/canvas_print_layout.h
@@ -68,9 +68,6 @@ public:
/** Get any items that have get_selected()==true.
*/
type_vec_items get_selected_items();
-
- typedef std::vector< Glib::RefPtr<const CanvasLayoutItem> > type_vec_const_items;
- type_vec_const_items get_selected_items() const;
private:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]