[gnote] Make methods const



commit 512b8587ff8ee72c25cee5020d610ae1fe4d645e
Author: Aurimas Černius <aurisc4 gmail com>
Date:   Wed Dec 30 20:18:58 2015 +0200

    Make methods const

 .../tableofcontents/tableofcontentsnoteaddin.cpp   |    4 ++--
 .../tableofcontents/tableofcontentsnoteaddin.hpp   |    6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/addins/tableofcontents/tableofcontentsnoteaddin.cpp 
b/src/addins/tableofcontents/tableofcontentsnoteaddin.cpp
index 9745e63..207a609 100644
--- a/src/addins/tableofcontents/tableofcontentsnoteaddin.cpp
+++ b/src/addins/tableofcontents/tableofcontentsnoteaddin.cpp
@@ -191,7 +191,7 @@ void TableofcontentsNoteAddin::on_populate_popup (Gtk::Menu* popup_menu)
 }
 
 
-bool TableofcontentsNoteAddin::has_tag_over_range (Glib::RefPtr<Gtk::TextTag> tag, Gtk::TextIter start, 
Gtk::TextIter end)
+bool TableofcontentsNoteAddin::has_tag_over_range (Glib::RefPtr<Gtk::TextTag> tag, Gtk::TextIter start, 
Gtk::TextIter end) const
 //return true if tag is set from start to end
 {
   bool has = false;
@@ -203,7 +203,7 @@ bool TableofcontentsNoteAddin::has_tag_over_range (Glib::RefPtr<Gtk::TextTag> ta
 }
 
 
-Heading::Type TableofcontentsNoteAddin::get_heading_level_for_range (Gtk::TextIter start, Gtk::TextIter end)
+Heading::Type TableofcontentsNoteAddin::get_heading_level_for_range (Gtk::TextIter start, Gtk::TextIter end) 
const
 //return the heading level from start to end
 {
   if (has_tag_over_range (m_tag_bold, start, end)) {
diff --git a/src/addins/tableofcontents/tableofcontentsnoteaddin.hpp 
b/src/addins/tableofcontents/tableofcontentsnoteaddin.hpp
index 181a393..87bc3d3 100644
--- a/src/addins/tableofcontents/tableofcontentsnoteaddin.hpp
+++ b/src/addins/tableofcontents/tableofcontentsnoteaddin.hpp
@@ -3,7 +3,7 @@
  *  It lists note's table of contents in a menu.
  *
  * Copyright (C) 2013 Luc Pionchon <pionchon luc gmail com>
- * Copyright (C) 2013 Aurimas Cernius
+ * Copyright (C) 2013,2015 Aurimas Cernius
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -75,8 +75,8 @@ private:
 
   void populate_toc_menu (Gtk::Menu *toc_menu, bool has_action_entries = true);
 
-  bool has_tag_over_range (Glib::RefPtr<Gtk::TextTag> tag, Gtk::TextIter start, Gtk::TextIter end);
-  Heading::Type get_heading_level_for_range (Gtk::TextIter start, Gtk::TextIter end);
+  bool has_tag_over_range (Glib::RefPtr<Gtk::TextTag> tag, Gtk::TextIter start, Gtk::TextIter end) const;
+  Heading::Type get_heading_level_for_range (Gtk::TextIter start, Gtk::TextIter end) const;
 
   void get_tableofcontents_menu_items (std::list<TableofcontentsMenuItem*> & items);
 


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