[glom] C++11: Document: Use of the override keyword.



commit 3a451c035368624559959e6a3077ea58a3099657
Author: Murray Cumming <murrayc murrayc com>
Date:   Mon Oct 26 22:33:46 2015 +0100

    C++11: Document: Use of the override keyword.

 glom/libglom/document/bakery/document_xml.h |    5 ++---
 glom/libglom/document/document.h            |    8 ++++----
 2 files changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/glom/libglom/document/bakery/document_xml.h b/glom/libglom/document/bakery/document_xml.h
index 373448f..cc0cdd6 100644
--- a/glom/libglom/document/bakery/document_xml.h
+++ b/glom/libglom/document/bakery/document_xml.h
@@ -37,9 +37,8 @@ public:
   Document_XML();
   virtual ~Document_XML();
 
-  //overrides:
-  virtual bool load_after(int& failure_code) override;
-  virtual bool save_before() override;
+  bool load_after(int& failure_code) override;
+  bool save_before() override;
 
   void set_dtd_name(const std::string& strVal); //e.g. "glom.dtd"
   std::string get_dtd_name() const;
diff --git a/glom/libglom/document/document.h b/glom/libglom/document/document.h
index 6769863..f768239 100644
--- a/glom/libglom/document/document.h
+++ b/glom/libglom/document/document.h
@@ -58,7 +58,7 @@ public:
   Document();
   virtual ~Document();
 
-  virtual void set_modified(bool value = true);
+  void set_modified(bool value = true) override;
 
   /** Set the file URI that will be used in future calls to load() and save().
    * Note that the document will not be saved immediately to the new URI. It will
@@ -66,7 +66,7 @@ public:
    * Likewise, the document at the URI will not be loaded until load() is called explicitly.
    * That is unlike in the base class's implementation.
    */
-  virtual void set_file_uri(const Glib::ustring& file_uri, bool bEnforceFileExtension = false);
+  void set_file_uri(const Glib::ustring& file_uri, bool bEnforceFileExtension = false) override;
 
   /* Loads data from disk, using the URI (set with set_file_uri()) then asks the View to update itself.
    * bool indicates success.
@@ -501,7 +501,7 @@ public:
 private:
   //Overrides:
 
-  virtual bool save_before() override;
+  bool save_before() override;
   void save_before_layout_group(xmlpp::Element* node, const std::shared_ptr<const LayoutGroup>& group, bool 
with_print_layout_positions = false);
   void save_before_sort_by(xmlpp::Element* node, const LayoutItem_GroupBy::type_list_sort_fields& 
list_fields);
   void save_before_layout_item_usesrelationship(xmlpp::Element* nodeItem, const std::shared_ptr<const 
UsesRelationship>& item);
@@ -515,7 +515,7 @@ private:
 
   void save_changes();
 
-  virtual bool load_after(int& failure_code);
+  bool load_after(int& failure_code) override;
   void load_after_layout_group(const xmlpp::Element* node, const Glib::ustring& table_name, const 
std::shared_ptr<LayoutGroup>& group, bool with_print_layout_positions = false);
   void load_after_sort_by(const xmlpp::Element* node, const Glib::ustring& table_name, 
LayoutItem_GroupBy::type_list_sort_fields& list_fields);
   void load_after_layout_item_usesrelationship(const xmlpp::Element* element, const Glib::ustring& 
table_name, const std::shared_ptr<UsesRelationship>& item);


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