[gnote] Move semantics for NoteEditor



commit dce94242cc2fa1cac09a8fdf715a1402057e0633
Author: Aurimas Černius <aurisc4 gmail com>
Date:   Sun May 29 18:05:02 2022 +0300

    Move semantics for NoteEditor

 src/noteeditor.cpp | 6 +++---
 src/noteeditor.hpp | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/noteeditor.cpp b/src/noteeditor.cpp
index e9dc843b..cc44de5a 100644
--- a/src/noteeditor.cpp
+++ b/src/noteeditor.cpp
@@ -1,7 +1,7 @@
 /*
  * gnote
  *
- * Copyright (C) 2010-2013,2016-2017,2019-2021 Aurimas Cernius
+ * Copyright (C) 2010-2013,2016-2017,2019-2022 Aurimas Cernius
  * Copyright (C) 2009 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
@@ -33,8 +33,8 @@
 
 namespace gnote {
 
-  NoteEditor::NoteEditor(const Glib::RefPtr<Gtk::TextBuffer> & buffer, Preferences & preferences)
-    : Gtk::TextView(buffer)
+  NoteEditor::NoteEditor(Glib::RefPtr<Gtk::TextBuffer> && buffer, Preferences & preferences)
+    : Gtk::TextView(std::move(buffer))
     , m_preferences(preferences)
   {
     set_wrap_mode(Gtk::WRAP_WORD);
diff --git a/src/noteeditor.hpp b/src/noteeditor.hpp
index a7c6077c..616f9897 100644
--- a/src/noteeditor.hpp
+++ b/src/noteeditor.hpp
@@ -1,7 +1,7 @@
 /*
  * gnote
  *
- * Copyright (C) 2011,2013,2016-2017,2019-2021 Aurimas Cernius
+ * Copyright (C) 2011,2013,2016-2017,2019-2022 Aurimas Cernius
  * Copyright (C) 2009 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
@@ -43,7 +43,7 @@ class NoteEditor
   : public Gtk::TextView
 {
 public:
-  NoteEditor(const Glib::RefPtr<Gtk::TextBuffer> & buffer, Preferences & preferences);
+  NoteEditor(Glib::RefPtr<Gtk::TextBuffer> && buffer, Preferences & preferences);
   static int default_margin()
     {
       return 8;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]