[libxml++] Parser: Make some methods const



commit 473000172794a8e006379afa1ba8667f4c3446d2
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date:   Wed May 3 15:41:18 2017 +0200

    Parser: Make some methods const

 libxml++/parsers/parser.cc |    4 ++--
 libxml++/parsers/parser.h  |    8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/libxml++/parsers/parser.cc b/libxml++/parsers/parser.cc
index ac8cc78..69c859e 100644
--- a/libxml++/parsers/parser.cc
+++ b/libxml++/parsers/parser.cc
@@ -79,7 +79,7 @@ void Parser::set_include_default_attributes(bool val) noexcept
   pimpl_->include_default_attributes_ = val;
 }
 
-bool Parser::get_include_default_attributes() noexcept
+bool Parser::get_include_default_attributes() const noexcept
 {
   return pimpl_->include_default_attributes_;
 }
@@ -90,7 +90,7 @@ void Parser::set_parser_options(int set_options, int clear_options) noexcept
   pimpl_->clear_options_ = clear_options;
 }
 
-void Parser::get_parser_options(int& set_options, int& clear_options) noexcept
+void Parser::get_parser_options(int& set_options, int& clear_options) const noexcept
 {
   set_options = pimpl_->set_options_;
   clear_options = pimpl_->clear_options_;
diff --git a/libxml++/parsers/parser.h b/libxml++/parsers/parser.h
index fabbf80..4cc92b1 100644
--- a/libxml++/parsers/parser.h
+++ b/libxml++/parsers/parser.h
@@ -112,7 +112,7 @@ public:
    *
    * @returns Whether attributes with default values will be included in the node tree.
    */
-  bool get_include_default_attributes() noexcept;
+  bool get_include_default_attributes() const noexcept;
 
   /** Set and/or clear parser option flags.
    * See the libxml2 documentation, enum xmlParserOption, for a list of parser options.
@@ -132,11 +132,11 @@ public:
    *
    * @newin{2,38}
    *
-   * @param [out] set_options Set bits correspond to flags that shall be set during parsing.
-   * @param [out] clear_options Set bits correspond to flags that shall be cleared during parsing.
+   * @param[out] set_options Set bits correspond to flags that shall be set during parsing.
+   * @param[out] clear_options Set bits correspond to flags that shall be cleared during parsing.
    *        Bits that are set in neither @a set_options nor @a clear_options are not affected.
    */
-  void get_parser_options(int& set_options, int& clear_options) noexcept;
+  void get_parser_options(int& set_options, int& clear_options) const noexcept;
 
   /** Parse an XML document from a file.
    * @throw exception


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