[libxml++] Add some noexcept
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml++] Add some noexcept
- Date: Thu, 7 Jan 2016 08:05:30 +0000 (UTC)
commit c8ffc5e7e35a3886917dea1c45e1ef0236dbb372
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date: Thu Jan 7 08:57:18 2016 +0100
Add some noexcept
libxml++/attributedeclaration.cc | 4 ++--
libxml++/attributedeclaration.h | 4 ++--
libxml++/attributenode.cc | 4 ++--
libxml++/attributenode.h | 4 ++--
libxml++/document.cc | 6 +++---
libxml++/document.h | 6 +++---
libxml++/dtd.cc | 6 +++---
libxml++/dtd.h | 4 ++--
libxml++/io/outputbuffer.cc | 4 ++--
libxml++/io/outputbuffer.h | 4 ++--
libxml++/io/parserinputbuffer.cc | 4 ++--
libxml++/io/parserinputbuffer.h | 4 ++--
libxml++/keepblanks.cc | 6 ++----
libxml++/keepblanks.h | 11 ++++-------
libxml++/nodes/entitydeclaration.cc | 4 ++--
libxml++/nodes/entitydeclaration.h | 4 ++--
libxml++/nodes/node.cc | 4 ++--
libxml++/nodes/node.h | 4 ++--
libxml++/noncopyable.cc | 2 +-
libxml++/noncopyable.h | 2 +-
libxml++/parsers/domparser.cc | 6 +++---
libxml++/parsers/domparser.h | 6 +++---
libxml++/parsers/parser.cc | 20 ++++++++++----------
libxml++/parsers/parser.h | 20 ++++++++++----------
libxml++/relaxngschema.cc | 8 ++++----
libxml++/relaxngschema.h | 4 ++--
libxml++/schemabase.cc | 2 +-
libxml++/schemabase.h | 2 +-
libxml++/validators/dtdvalidator.cc | 6 +++---
libxml++/validators/dtdvalidator.h | 4 ++--
libxml++/validators/relaxngvalidator.cc | 6 +++---
libxml++/validators/relaxngvalidator.h | 4 ++--
libxml++/validators/schemavalidatorbase.cc | 2 +-
libxml++/validators/schemavalidatorbase.h | 2 +-
libxml++/validators/validator.cc | 2 +-
libxml++/validators/validator.h | 2 +-
libxml++/validators/xsdvalidator.cc | 6 +++---
libxml++/validators/xsdvalidator.h | 4 ++--
libxml++/xsdschema.cc | 8 ++++----
libxml++/xsdschema.h | 4 ++--
40 files changed, 102 insertions(+), 107 deletions(-)
---
diff --git a/libxml++/attributedeclaration.cc b/libxml++/attributedeclaration.cc
index 16ff57b..d187721 100644
--- a/libxml++/attributedeclaration.cc
+++ b/libxml++/attributedeclaration.cc
@@ -25,14 +25,14 @@ Glib::ustring AttributeDeclaration::get_value() const
return (const char*)cobj()->defaultValue;
}
-xmlAttribute* AttributeDeclaration::cobj()
+xmlAttribute* AttributeDeclaration::cobj() noexcept
{
// An XML_ATTRIBUTE_DECL is represented by an xmlAttribute struct. Reinterpret
// the xmlNode pointer stored in the base class as an xmlAttribute pointer.
return reinterpret_cast<xmlAttribute*>(Node::cobj());
}
-const xmlAttribute* AttributeDeclaration::cobj() const
+const xmlAttribute* AttributeDeclaration::cobj() const noexcept
{
// An XML_ATTRIBUTE_DECL is represented by an xmlAttribute struct. Reinterpret
// the xmlNode pointer stored in the base class as an xmlAttribute pointer.
diff --git a/libxml++/attributedeclaration.h b/libxml++/attributedeclaration.h
index 446436f..6a9d986 100644
--- a/libxml++/attributedeclaration.h
+++ b/libxml++/attributedeclaration.h
@@ -37,10 +37,10 @@ public:
Glib::ustring get_value() const override;
///Access the underlying libxml implementation.
- _xmlAttribute* cobj();
+ _xmlAttribute* cobj() noexcept;
///Access the underlying libxml implementation.
- const _xmlAttribute* cobj() const;
+ const _xmlAttribute* cobj() const noexcept;
};
} // namespace xmlpp
diff --git a/libxml++/attributenode.cc b/libxml++/attributenode.cc
index 267af7a..c585c31 100644
--- a/libxml++/attributenode.cc
+++ b/libxml++/attributenode.cc
@@ -42,14 +42,14 @@ void AttributeNode::set_value(const Glib::ustring& value)
xmlSetProp(cobj()->parent, cobj()->name, (const xmlChar*)value.c_str());
}
-xmlAttr* AttributeNode::cobj()
+xmlAttr* AttributeNode::cobj() noexcept
{
// An XML_ATTRIBUTE_NODE is represented by an xmlAttr struct. Reinterpret
// the xmlNode pointer stored in the base class as an xmlAttr pointer.
return reinterpret_cast<xmlAttr*>(Node::cobj());
}
-const xmlAttr* AttributeNode::cobj() const
+const xmlAttr* AttributeNode::cobj() const noexcept
{
// An XML_ATTRIBUTE_NODE is represented by an xmlAttr struct. Reinterpret
// the xmlNode pointer stored in the base class as an xmlAttr pointer.
diff --git a/libxml++/attributenode.h b/libxml++/attributenode.h
index cc28114..68dada4 100644
--- a/libxml++/attributenode.h
+++ b/libxml++/attributenode.h
@@ -47,13 +47,13 @@ public:
*
* @newin{3,0} Replaces Attribute::cobj()
*/
- _xmlAttr* cobj();
+ _xmlAttr* cobj() noexcept;
/** Access the underlying libxml implementation.
*
* @newin{3,0} Replaces Attribute::cobj() const
*/
- const _xmlAttr* cobj() const;
+ const _xmlAttr* cobj() const noexcept;
};
} // namespace xmlpp
diff --git a/libxml++/document.cc b/libxml++/document.cc
index 692a4a7..be1ed2f 100644
--- a/libxml++/document.cc
+++ b/libxml++/document.cc
@@ -152,7 +152,7 @@ Document::Init::Init()
xmlInitParser(); //Not always necessary, but necessary for thread safety.
}
-Document::Init::~Init()
+Document::Init::~Init() noexcept
{
//We don't call this because it breaks libxml generally and should only be
//called at the very end of a process, such as at the end of a main().
@@ -470,12 +470,12 @@ _xmlEntity* Document::get_entity(const Glib::ustring& name)
return xmlGetDocEntity(impl_, (const xmlChar*) name.c_str());
}
-_xmlDoc* Document::cobj()
+_xmlDoc* Document::cobj() noexcept
{
return impl_;
}
-const _xmlDoc* Document::cobj() const
+const _xmlDoc* Document::cobj() const noexcept
{
return impl_;
}
diff --git a/libxml++/document.h b/libxml++/document.h
index 99f3fa5..90ffaa4 100644
--- a/libxml++/document.h
+++ b/libxml++/document.h
@@ -69,7 +69,7 @@ class Document : public NonCopyable
{
public:
Init();
- ~Init();
+ ~Init() noexcept;
};
friend class SaxParser;
@@ -252,10 +252,10 @@ public:
int process_xinclude(bool generate_xinclude_nodes = true);
///Access the underlying libxml implementation.
- _xmlDoc* cobj();
+ _xmlDoc* cobj() noexcept;
///Access the underlying libxml implementation.
- const _xmlDoc* cobj() const;
+ const _xmlDoc* cobj() const noexcept;
protected:
/** Retrieve an Entity.
diff --git a/libxml++/dtd.cc b/libxml++/dtd.cc
index 8a6d601..586461c 100644
--- a/libxml++/dtd.cc
+++ b/libxml++/dtd.cc
@@ -15,7 +15,7 @@ namespace xmlpp
struct Dtd::Impl
{
- Impl() : dtd(nullptr), is_dtd_owner(false) {}
+ Impl() noexcept : dtd(nullptr), is_dtd_owner(false) {}
_xmlDtd* dtd;
bool is_dtd_owner;
@@ -120,12 +120,12 @@ Glib::ustring Dtd::get_system_id() const
return (pimpl_->dtd && pimpl_->dtd->SystemID) ? (const char*)pimpl_->dtd->SystemID : "";
}
-_xmlDtd* Dtd::cobj()
+_xmlDtd* Dtd::cobj() noexcept
{
return pimpl_->dtd;
}
-const _xmlDtd* Dtd::cobj() const
+const _xmlDtd* Dtd::cobj() const noexcept
{
return pimpl_->dtd;
}
diff --git a/libxml++/dtd.h b/libxml++/dtd.h
index d3f9030..1686777 100644
--- a/libxml++/dtd.h
+++ b/libxml++/dtd.h
@@ -117,11 +117,11 @@ public:
/** Access the underlying libxml implementation.
*/
- _xmlDtd* cobj();
+ _xmlDtd* cobj() noexcept;
/** Access the underlying libxml implementation.
*/
- const _xmlDtd* cobj() const;
+ const _xmlDtd* cobj() const noexcept;
protected:
void release_underlying();
diff --git a/libxml++/io/outputbuffer.cc b/libxml++/io/outputbuffer.cc
index c454417..9f3750b 100644
--- a/libxml++/io/outputbuffer.cc
+++ b/libxml++/io/outputbuffer.cc
@@ -93,12 +93,12 @@ namespace xmlpp
return true;
}
- _xmlOutputBuffer* OutputBuffer::cobj()
+ _xmlOutputBuffer* OutputBuffer::cobj() noexcept
{
return impl_;
}
- const _xmlOutputBuffer* OutputBuffer::cobj() const
+ const _xmlOutputBuffer* OutputBuffer::cobj() const noexcept
{
return impl_;
}
diff --git a/libxml++/io/outputbuffer.h b/libxml++/io/outputbuffer.h
index 7711555..e07b153 100644
--- a/libxml++/io/outputbuffer.h
+++ b/libxml++/io/outputbuffer.h
@@ -46,11 +46,11 @@ namespace xmlpp
public:
/** gives an access to the underlying libxml structure to the children
*/
- _xmlOutputBuffer* cobj();
+ _xmlOutputBuffer* cobj() noexcept;
/** gives an access to the underlying libxml structure to the children
*/
- const _xmlOutputBuffer* cobj() const;
+ const _xmlOutputBuffer* cobj() const noexcept;
private:
bool on_write(const char * buffer, int len);
diff --git a/libxml++/io/parserinputbuffer.cc b/libxml++/io/parserinputbuffer.cc
index e4d2473..24cd2a8 100644
--- a/libxml++/io/parserinputbuffer.cc
+++ b/libxml++/io/parserinputbuffer.cc
@@ -71,12 +71,12 @@ namespace xmlpp
return true;
}
- _xmlParserInputBuffer* ParserInputBuffer::cobj()
+ _xmlParserInputBuffer* ParserInputBuffer::cobj() noexcept
{
return impl_;
}
- const _xmlParserInputBuffer* ParserInputBuffer::cobj() const
+ const _xmlParserInputBuffer* ParserInputBuffer::cobj() const noexcept
{
return impl_;
}
diff --git a/libxml++/io/parserinputbuffer.h b/libxml++/io/parserinputbuffer.h
index a584708..54dd6d2 100644
--- a/libxml++/io/parserinputbuffer.h
+++ b/libxml++/io/parserinputbuffer.h
@@ -37,11 +37,11 @@ namespace xmlpp
public:
/** gives an access to the underlying libxml structure to the children
*/
- _xmlParserInputBuffer* cobj();
+ _xmlParserInputBuffer* cobj() noexcept;
/** gives an access to the underlying libxml structure to the children
*/
- const _xmlParserInputBuffer* cobj() const;
+ const _xmlParserInputBuffer* cobj() const noexcept;
private:
int on_read(char * buffer, int len);
diff --git a/libxml++/keepblanks.cc b/libxml++/keepblanks.cc
index b49b3cf..4228b8d 100644
--- a/libxml++/keepblanks.cc
+++ b/libxml++/keepblanks.cc
@@ -11,21 +11,19 @@
namespace xmlpp
{
-
#if _MSC_VER == 1200 // detect MSVC 6.0
const bool KeepBlanks::Default = true;
#endif
- KeepBlanks::KeepBlanks(bool value)
+ KeepBlanks::KeepBlanks(bool value) noexcept
{
oldIndentTreeOutput_ = xmlIndentTreeOutput;
oldKeepBlanksDefault_ = xmlKeepBlanksDefault( value?1:0 );
}
- KeepBlanks::~KeepBlanks()
+ KeepBlanks::~KeepBlanks() noexcept
{
xmlKeepBlanksDefault(oldKeepBlanksDefault_);
xmlIndentTreeOutput = oldIndentTreeOutput_;
}
}
-
diff --git a/libxml++/keepblanks.h b/libxml++/keepblanks.h
index a2002e2..99391a0 100644
--- a/libxml++/keepblanks.h
+++ b/libxml++/keepblanks.h
@@ -10,10 +10,8 @@
namespace xmlpp
{
-
- /**
- * This class set KeepBlanksDefault and IndentTreeOutput of libxmlpp
- * and restore their initial value in its destructor. As a consequence
+ /** This class sets KeepBlanksDefault and IndentTreeOutput of libxmlpp
+ * and restores their initial values in its destructor. As a consequence
* the wanted setting is kept during instance lifetime.
*/
class KeepBlanks {
@@ -25,14 +23,13 @@ namespace xmlpp
#endif
public:
- KeepBlanks(bool value);
- ~KeepBlanks();
+ KeepBlanks(bool value) noexcept;
+ ~KeepBlanks() noexcept;
private:
int oldKeepBlanksDefault_;
int oldIndentTreeOutput_;
};
-
}
#endif // __LIBXMLPP_KEEPBLANKS_H
diff --git a/libxml++/nodes/entitydeclaration.cc b/libxml++/nodes/entitydeclaration.cc
index 9486cb4..3b5c08a 100644
--- a/libxml++/nodes/entitydeclaration.cc
+++ b/libxml++/nodes/entitydeclaration.cc
@@ -27,14 +27,14 @@ Glib::ustring EntityDeclaration::get_original_text() const
return cobj()->orig ? (const char*)cobj()->orig : "";
}
-xmlEntity* EntityDeclaration::cobj()
+xmlEntity* EntityDeclaration::cobj() noexcept
{
// An XML_ENTITY_DECL is represented by an xmlEntity struct. Reinterpret
// the xmlNode pointer stored in the base class as an xmlEntity pointer.
return reinterpret_cast<xmlEntity*>(Node::cobj());
}
-const xmlEntity* EntityDeclaration::cobj() const
+const xmlEntity* EntityDeclaration::cobj() const noexcept
{
// An XML_ENTITY_DECL is represented by an xmlEntity struct. Reinterpret
// the xmlNode pointer stored in the base class as an xmlEntity pointer.
diff --git a/libxml++/nodes/entitydeclaration.h b/libxml++/nodes/entitydeclaration.h
index 258e24b..0cc3f3e 100644
--- a/libxml++/nodes/entitydeclaration.h
+++ b/libxml++/nodes/entitydeclaration.h
@@ -43,10 +43,10 @@ public:
Glib::ustring get_original_text() const;
///Access the underlying libxml implementation.
- _xmlEntity* cobj();
+ _xmlEntity* cobj() noexcept;
///Access the underlying libxml implementation.
- const _xmlEntity* cobj() const;
+ const _xmlEntity* cobj() const noexcept;
};
} // namespace xmlpp
diff --git a/libxml++/nodes/node.cc b/libxml++/nodes/node.cc
index 86a7846..3dd47c3 100644
--- a/libxml++/nodes/node.cc
+++ b/libxml++/nodes/node.cc
@@ -376,12 +376,12 @@ int Node::get_line() const
}
-xmlNode* Node::cobj()
+xmlNode* Node::cobj() noexcept
{
return impl_;
}
-const xmlNode* Node::cobj() const
+const xmlNode* Node::cobj() const noexcept
{
return impl_;
}
diff --git a/libxml++/nodes/node.h b/libxml++/nodes/node.h
index f53e0b8..e5ac5a0 100644
--- a/libxml++/nodes/node.h
+++ b/libxml++/nodes/node.h
@@ -316,10 +316,10 @@ public:
XPathResultType* result_type = nullptr) const;
///Access the underlying libxml implementation.
- _xmlNode* cobj();
+ _xmlNode* cobj() noexcept;
///Access the underlying libxml implementation.
- const _xmlNode* cobj() const;
+ const _xmlNode* cobj() const noexcept;
/** Construct the correct C++ instance for a given libxml C struct instance.
*
diff --git a/libxml++/noncopyable.cc b/libxml++/noncopyable.cc
index f809f48..76980e1 100644
--- a/libxml++/noncopyable.cc
+++ b/libxml++/noncopyable.cc
@@ -10,7 +10,7 @@
namespace xmlpp
{
-NonCopyable::NonCopyable()
+NonCopyable::NonCopyable() noexcept
{
}
diff --git a/libxml++/noncopyable.h b/libxml++/noncopyable.h
index d82395a..81920c8 100644
--- a/libxml++/noncopyable.h
+++ b/libxml++/noncopyable.h
@@ -17,7 +17,7 @@ namespace xmlpp
class NonCopyable
{
protected:
- NonCopyable();
+ NonCopyable() noexcept;
virtual ~NonCopyable();
NonCopyable(const NonCopyable&) = delete;
diff --git a/libxml++/parsers/domparser.cc b/libxml++/parsers/domparser.cc
index 329bae5..9d623d1 100644
--- a/libxml++/parsers/domparser.cc
+++ b/libxml++/parsers/domparser.cc
@@ -218,17 +218,17 @@ void DomParser::release_underlying()
Parser::release_underlying();
}
-DomParser::operator bool() const
+DomParser::operator bool() const noexcept
{
return doc_ != nullptr;
}
-Document* DomParser::get_document()
+Document* DomParser::get_document() noexcept
{
return doc_;
}
-const Document* DomParser::get_document() const
+const Document* DomParser::get_document() const noexcept
{
return doc_;
}
diff --git a/libxml++/parsers/domparser.h b/libxml++/parsers/domparser.h
index a608739..df7ea23 100644
--- a/libxml++/parsers/domparser.h
+++ b/libxml++/parsers/domparser.h
@@ -76,17 +76,17 @@ public:
/** Test whether a document has been parsed.
*/
- operator bool() const;
+ operator bool() const noexcept;
/** Get the parsed document.
* @returns A pointer to the parsed document, or <tt>nullptr</tt>.
*/
- Document* get_document();
+ Document* get_document() noexcept;
/** Get the parsed document.
* @returns A pointer to the parsed document, or <tt>nullptr</tt>.
*/
- const Document* get_document() const;
+ const Document* get_document() const noexcept;
protected:
void parse_context();
diff --git a/libxml++/parsers/parser.cc b/libxml++/parsers/parser.cc
index e1b9883..ac8cc78 100644
--- a/libxml++/parsers/parser.cc
+++ b/libxml++/parsers/parser.cc
@@ -44,53 +44,53 @@ Parser::~Parser()
release_underlying();
}
-void Parser::set_validate(bool val)
+void Parser::set_validate(bool val) noexcept
{
pimpl_->validate_ = val;
}
-bool Parser::get_validate() const
+bool Parser::get_validate() const noexcept
{
return pimpl_->validate_;
}
-void Parser::set_substitute_entities(bool val)
+void Parser::set_substitute_entities(bool val) noexcept
{
pimpl_->substitute_entities_ = val;
}
-bool Parser::get_substitute_entities() const
+bool Parser::get_substitute_entities() const noexcept
{
return pimpl_->substitute_entities_;
}
-void Parser::set_throw_messages(bool val)
+void Parser::set_throw_messages(bool val) noexcept
{
pimpl_->throw_messages_ = val;
}
-bool Parser::get_throw_messages() const
+bool Parser::get_throw_messages() const noexcept
{
return pimpl_->throw_messages_;
}
-void Parser::set_include_default_attributes(bool val)
+void Parser::set_include_default_attributes(bool val) noexcept
{
pimpl_->include_default_attributes_ = val;
}
-bool Parser::get_include_default_attributes()
+bool Parser::get_include_default_attributes() noexcept
{
return pimpl_->include_default_attributes_;
}
-void Parser::set_parser_options(int set_options, int clear_options)
+void Parser::set_parser_options(int set_options, int clear_options) noexcept
{
pimpl_->set_options_ = set_options;
pimpl_->clear_options_ = clear_options;
}
-void Parser::get_parser_options(int& set_options, int& clear_options)
+void Parser::get_parser_options(int& set_options, int& clear_options) noexcept
{
set_options = pimpl_->set_options_;
clear_options = pimpl_->clear_options_;
diff --git a/libxml++/parsers/parser.h b/libxml++/parsers/parser.h
index d295342..fabbf80 100644
--- a/libxml++/parsers/parser.h
+++ b/libxml++/parsers/parser.h
@@ -43,24 +43,24 @@ public:
/** By default, the parser will not validate the XML file.
* @param val Whether the document should be validated.
*/
- void set_validate(bool val = true);
+ void set_validate(bool val = true) noexcept;
/** See set_validate().
* @returns Whether the parser will validate the XML file.
*/
- bool get_validate() const;
+ bool get_validate() const noexcept;
/** Set whether the parser will automatically substitute entity references with the text of the entities'
definitions.
* For instance, this affects the text returned by ContentNode::get_content().
* By default, the parser will not substitute entities, so that you do not lose the entity reference
information.
* @param val Whether entities will be substitued.
*/
- void set_substitute_entities(bool val = true);
+ void set_substitute_entities(bool val = true) noexcept;
/** See set_substitute_entities().
* @returns Whether entities will be substituted during parsing.
*/
- bool get_substitute_entities() const;
+ bool get_substitute_entities() const noexcept;
/** Set whether the parser will collect and throw error and warning messages.
*
@@ -84,7 +84,7 @@ public:
*
* @param val Whether messages will be collected and thrown in an exception.
*/
- void set_throw_messages(bool val = true);
+ void set_throw_messages(bool val = true) noexcept;
/** See set_throw_messages().
*
@@ -92,7 +92,7 @@ public:
*
* @returns Whether messages will be collected and thrown in an exception.
*/
- bool get_throw_messages() const;
+ bool get_throw_messages() const noexcept;
/** Set whether default attribute values from the DTD shall be included in the node tree.
* If set, attributes not assigned a value in the XML file, but with a default value
@@ -104,7 +104,7 @@ public:
*
* @param val Whether attributes with default values will be included in the node tree.
*/
- void set_include_default_attributes(bool val = true);
+ void set_include_default_attributes(bool val = true) noexcept;
/** See set_include_default_attributes().
*
@@ -112,7 +112,7 @@ public:
*
* @returns Whether attributes with default values will be included in the node tree.
*/
- bool get_include_default_attributes();
+ bool get_include_default_attributes() noexcept;
/** Set and/or clear parser option flags.
* See the libxml2 documentation, enum xmlParserOption, for a list of parser options.
@@ -126,7 +126,7 @@ public:
* @param 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 set_parser_options(int set_options = 0, int clear_options = 0);
+ void set_parser_options(int set_options = 0, int clear_options = 0) noexcept;
/** See set_parser_options().
*
@@ -136,7 +136,7 @@ public:
* @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);
+ void get_parser_options(int& set_options, int& clear_options) noexcept;
/** Parse an XML document from a file.
* @throw exception
diff --git a/libxml++/relaxngschema.cc b/libxml++/relaxngschema.cc
index 36a65b9..4e44f41 100644
--- a/libxml++/relaxngschema.cc
+++ b/libxml++/relaxngschema.cc
@@ -31,7 +31,7 @@ namespace
class RelaxNGSchemaParserContextHolder
{
public:
- RelaxNGSchemaParserContextHolder(xmlRelaxNGParserCtxtPtr ctx): ctx_(ctx) {}
+ RelaxNGSchemaParserContextHolder(xmlRelaxNGParserCtxtPtr ctx) noexcept : ctx_(ctx) {}
~RelaxNGSchemaParserContextHolder() { if (ctx_) xmlRelaxNGFreeParserCtxt(ctx_); }
private:
@@ -44,7 +44,7 @@ namespace xmlpp
struct RelaxNGSchema::Impl
{
- Impl() : schema(nullptr) {}
+ Impl() noexcept : schema(nullptr) {}
_xmlRelaxNG* schema;
};
@@ -112,12 +112,12 @@ void RelaxNGSchema::parse_context(_xmlRelaxNGParserCtxt* context)
throw parse_error("RelaxNGSchema::parse_context(): Schema could not be parsed.\n" + format_xml_error());
}
-_xmlRelaxNG* RelaxNGSchema::cobj()
+_xmlRelaxNG* RelaxNGSchema::cobj() noexcept
{
return pimpl_->schema;
}
-const _xmlRelaxNG* RelaxNGSchema::cobj() const
+const _xmlRelaxNG* RelaxNGSchema::cobj() const noexcept
{
return pimpl_->schema;
}
diff --git a/libxml++/relaxngschema.h b/libxml++/relaxngschema.h
index b658cfd..b18e359 100644
--- a/libxml++/relaxngschema.h
+++ b/libxml++/relaxngschema.h
@@ -94,10 +94,10 @@ public:
void parse_document(const Document* document) override;
/** Access the underlying libxml implementation. */
- _xmlRelaxNG* cobj();
+ _xmlRelaxNG* cobj() noexcept;
/** Access the underlying libxml implementation. */
- const _xmlRelaxNG* cobj() const;
+ const _xmlRelaxNG* cobj() const noexcept;
protected:
void release_underlying();
diff --git a/libxml++/schemabase.cc b/libxml++/schemabase.cc
index 02eb660..aec357b 100644
--- a/libxml++/schemabase.cc
+++ b/libxml++/schemabase.cc
@@ -21,7 +21,7 @@
namespace xmlpp
{
-SchemaBase::SchemaBase()
+SchemaBase::SchemaBase() noexcept
{
}
diff --git a/libxml++/schemabase.h b/libxml++/schemabase.h
index c7330b2..6ea2bdd 100644
--- a/libxml++/schemabase.h
+++ b/libxml++/schemabase.h
@@ -38,7 +38,7 @@ class Document;
class SchemaBase : public NonCopyable
{
public:
- SchemaBase();
+ SchemaBase() noexcept;
~SchemaBase() override;
/** Parse a schema definition file.
diff --git a/libxml++/validators/dtdvalidator.cc b/libxml++/validators/dtdvalidator.cc
index 27560de..7ae5c99 100644
--- a/libxml++/validators/dtdvalidator.cc
+++ b/libxml++/validators/dtdvalidator.cc
@@ -23,7 +23,7 @@ namespace xmlpp
struct DtdValidator::Impl
{
- Impl() : dtd(nullptr), is_dtd_owner(false), context(nullptr) {}
+ Impl() noexcept : dtd(nullptr), is_dtd_owner(false), context(nullptr) {}
Dtd* dtd;
bool is_dtd_owner;
@@ -130,12 +130,12 @@ DtdValidator::operator bool() const noexcept
return pimpl_->dtd && pimpl_->dtd->cobj();
}
-Dtd* DtdValidator::get_dtd()
+Dtd* DtdValidator::get_dtd() noexcept
{
return pimpl_->dtd;
}
-const Dtd* DtdValidator::get_dtd() const
+const Dtd* DtdValidator::get_dtd() const noexcept
{
return pimpl_->dtd;
}
diff --git a/libxml++/validators/dtdvalidator.h b/libxml++/validators/dtdvalidator.h
index e8b841b..338005b 100644
--- a/libxml++/validators/dtdvalidator.h
+++ b/libxml++/validators/dtdvalidator.h
@@ -105,12 +105,12 @@ public:
/** Get the parsed DTD.
* @returns A pointer to the parsed DTD, or <tt>nullptr</tt>.
*/
- Dtd* get_dtd();
+ Dtd* get_dtd() noexcept;
/** Get the parsed DTD.
* @returns A pointer to the parsed DTD, or <tt>nullptr</tt>.
*/
- const Dtd* get_dtd() const;
+ const Dtd* get_dtd() const noexcept;
/** Validate a document, using a previously parsed DTD.
* The internal subset (if present) is de-coupled (i.e. not used),
diff --git a/libxml++/validators/relaxngvalidator.cc b/libxml++/validators/relaxngvalidator.cc
index 4b7a58f..392a4cf 100644
--- a/libxml++/validators/relaxngvalidator.cc
+++ b/libxml++/validators/relaxngvalidator.cc
@@ -29,7 +29,7 @@ namespace xmlpp
struct RelaxNGValidator::Impl
{
- Impl() : schema(nullptr), is_schema_owner(false), context(nullptr) {}
+ Impl() noexcept : schema(nullptr), is_schema_owner(false), context(nullptr) {}
RelaxNGSchema* schema;
bool is_schema_owner;
@@ -107,12 +107,12 @@ void RelaxNGValidator::release_underlying()
SchemaValidatorBase::release_underlying();
}
-RelaxNGSchema* RelaxNGValidator::get_schema()
+RelaxNGSchema* RelaxNGValidator::get_schema() noexcept
{
return pimpl_->schema;
}
-const RelaxNGSchema* RelaxNGValidator::get_schema() const
+const RelaxNGSchema* RelaxNGValidator::get_schema() const noexcept
{
return pimpl_->schema;
}
diff --git a/libxml++/validators/relaxngvalidator.h b/libxml++/validators/relaxngvalidator.h
index e67b6b5..0e37852 100644
--- a/libxml++/validators/relaxngvalidator.h
+++ b/libxml++/validators/relaxngvalidator.h
@@ -125,12 +125,12 @@ public:
/** Get the schema.
* @returns A pointer to the schema, or <tt>nullptr</tt>.
*/
- RelaxNGSchema* get_schema();
+ RelaxNGSchema* get_schema() noexcept;
/** Get the schema.
* @returns A pointer to the schema, or <tt>nullptr</tt>.
*/
- const RelaxNGSchema* get_schema() const;
+ const RelaxNGSchema* get_schema() const noexcept;
/** Validate a document, using a previously parsed schema.
* @param document Pointer to the document.
diff --git a/libxml++/validators/schemavalidatorbase.cc b/libxml++/validators/schemavalidatorbase.cc
index f282452..bbd1898 100644
--- a/libxml++/validators/schemavalidatorbase.cc
+++ b/libxml++/validators/schemavalidatorbase.cc
@@ -22,7 +22,7 @@
namespace xmlpp
{
-SchemaValidatorBase::SchemaValidatorBase()
+SchemaValidatorBase::SchemaValidatorBase() noexcept
{
}
diff --git a/libxml++/validators/schemavalidatorbase.h b/libxml++/validators/schemavalidatorbase.h
index bc7b315..104fda7 100644
--- a/libxml++/validators/schemavalidatorbase.h
+++ b/libxml++/validators/schemavalidatorbase.h
@@ -37,7 +37,7 @@ class Document;
class SchemaValidatorBase : public Validator
{
public:
- SchemaValidatorBase();
+ SchemaValidatorBase() noexcept;
~SchemaValidatorBase() override;
/** Parse a schema definition file.
diff --git a/libxml++/validators/validator.cc b/libxml++/validators/validator.cc
index e91a2f6..ec44994 100644
--- a/libxml++/validators/validator.cc
+++ b/libxml++/validators/validator.cc
@@ -15,7 +15,7 @@
namespace xmlpp {
-Validator::Validator()
+Validator::Validator() noexcept
: exception_(nullptr)
{
}
diff --git a/libxml++/validators/validator.h b/libxml++/validators/validator.h
index ed32460..32ed3fc 100644
--- a/libxml++/validators/validator.h
+++ b/libxml++/validators/validator.h
@@ -31,7 +31,7 @@ class Document;
class Validator : public NonCopyable
{
public:
- Validator();
+ Validator() noexcept;
~Validator() override;
/** Parse a schema definition file or an external subset (DTD file).
diff --git a/libxml++/validators/xsdvalidator.cc b/libxml++/validators/xsdvalidator.cc
index cc26d07..b399db4 100644
--- a/libxml++/validators/xsdvalidator.cc
+++ b/libxml++/validators/xsdvalidator.cc
@@ -26,7 +26,7 @@ namespace xmlpp
struct XsdValidator::Impl
{
- Impl() : schema(nullptr), is_schema_owner(false), context(nullptr) {}
+ Impl() noexcept : schema(nullptr), is_schema_owner(false), context(nullptr) {}
XsdSchema* schema;
bool is_schema_owner;
@@ -104,12 +104,12 @@ void XsdValidator::release_underlying()
SchemaValidatorBase::release_underlying();
}
-XsdSchema* XsdValidator::get_schema()
+XsdSchema* XsdValidator::get_schema() noexcept
{
return pimpl_->schema;
}
-const XsdSchema* XsdValidator::get_schema() const
+const XsdSchema* XsdValidator::get_schema() const noexcept
{
return pimpl_->schema;
}
diff --git a/libxml++/validators/xsdvalidator.h b/libxml++/validators/xsdvalidator.h
index c012f41..71d23cf 100644
--- a/libxml++/validators/xsdvalidator.h
+++ b/libxml++/validators/xsdvalidator.h
@@ -116,12 +116,12 @@ public:
/** Get the schema.
* @returns A pointer to the schema, or <tt>nullptr</tt>.
*/
- XsdSchema* get_schema();
+ XsdSchema* get_schema() noexcept;
/** Get the schema.
* @returns A pointer to the schema, or <tt>nullptr</tt>.
*/
- const XsdSchema* get_schema() const;
+ const XsdSchema* get_schema() const noexcept;
/** Validate a document, using a previously parsed schema.
* @param document Pointer to the document.
diff --git a/libxml++/xsdschema.cc b/libxml++/xsdschema.cc
index 2357e87..c91ef37 100644
--- a/libxml++/xsdschema.cc
+++ b/libxml++/xsdschema.cc
@@ -29,7 +29,7 @@ namespace
class XsdSchemaParserContextHolder
{
public:
- XsdSchemaParserContextHolder(xmlSchemaParserCtxtPtr ctx): ctx_(ctx) {}
+ XsdSchemaParserContextHolder(xmlSchemaParserCtxtPtr ctx) noexcept : ctx_(ctx) {}
~XsdSchemaParserContextHolder() { if (ctx_) xmlSchemaFreeParserCtxt(ctx_); }
private:
@@ -42,7 +42,7 @@ namespace xmlpp
struct XsdSchema::Impl
{
- Impl() : schema(nullptr), document(nullptr) {}
+ Impl() noexcept : schema(nullptr), document(nullptr) {}
_xmlSchema* schema;
_xmlDoc* document;
@@ -122,12 +122,12 @@ void XsdSchema::parse_context(_xmlSchemaParserCtxt* context)
}
}
-_xmlSchema* XsdSchema::cobj()
+_xmlSchema* XsdSchema::cobj() noexcept
{
return pimpl_->schema;
}
-const _xmlSchema* XsdSchema::cobj() const
+const _xmlSchema* XsdSchema::cobj() const noexcept
{
return pimpl_->schema;
}
diff --git a/libxml++/xsdschema.h b/libxml++/xsdschema.h
index 2c26c11..9d86526 100644
--- a/libxml++/xsdschema.h
+++ b/libxml++/xsdschema.h
@@ -85,10 +85,10 @@ public:
void parse_document(const Document* document) override;
/** Access the underlying libxml implementation. */
- _xmlSchema* cobj();
+ _xmlSchema* cobj() noexcept;
/** Access the underlying libxml implementation. */
- const _xmlSchema* cobj() const;
+ const _xmlSchema* cobj() const noexcept;
protected:
void release_underlying();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]