[glom] test_canvas_editable: Use unique_ptr<> instead of naked new.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom] test_canvas_editable: Use unique_ptr<> instead of naked new.
- Date: Fri, 5 Feb 2016 11:20:53 +0000 (UTC)
commit 28bf17468cf539e4dfce9a0a1378c5b3465348c0
Author: Murray Cumming <murrayc murrayc com>
Date: Fri Feb 5 11:12:22 2016 +0100
test_canvas_editable: Use unique_ptr<> instead of naked new.
.../utility_widgets/canvas/test_canvas_editable.cc | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/glom/utility_widgets/canvas/test_canvas_editable.cc
b/glom/utility_widgets/canvas/test_canvas_editable.cc
index 97343d6..e7b040c 100644
--- a/glom/utility_widgets/canvas/test_canvas_editable.cc
+++ b/glom/utility_widgets/canvas/test_canvas_editable.cc
@@ -184,11 +184,11 @@ private:
menu->append(_("_Delete"), "context.delete");
//Get the menu:
- m_context_menu = new Gtk::Menu(menu);
+ m_context_menu = std::make_unique<Gtk::Menu>(menu);
m_context_menu->attach_to_widget(*this);
}
- Gtk::Menu* m_context_menu;
+ std::unique_ptr<Gtk::Menu> m_context_menu;
Glib::RefPtr<Gtk::ActionGroup> m_context_menu_action_group;
Glib::RefPtr<Gtk::Builder> m_context_menu_builder;
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]