From 3b5810315734c815ff4c6385ebe8cf2d00bbb573 Mon Sep 17 00:00:00 2001
From: Pavel Kryukov <kryukov@frtk.ru>
Date: Wed, 5 Oct 2016 20:11:07 +0300
Subject: Add 'override' keyword if C++11 is enabled

---
 src/pugixml.hpp | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

(limited to 'src')

diff --git a/src/pugixml.hpp b/src/pugixml.hpp
index 09bd692..898dab8 100644
--- a/src/pugixml.hpp
+++ b/src/pugixml.hpp
@@ -72,6 +72,15 @@
 #	endif
 #endif
 
+// If no API for functions is defined, assume default
+#ifndef PUGIXML_OVERRIDE
+#	if __cplusplus >= 201103
+#		define PUGIXML_OVERRIDE override
+#	else
+#		define PUGIXML_OVERRIDE
+#	endif
+#endif
+
 // Character interface macros
 #ifdef PUGIXML_WCHAR_MODE
 #	define PUGIXML_TEXT(t) L ## t
@@ -273,7 +282,7 @@ namespace pugi
 		// Construct writer from a FILE* object; void* is used to avoid header dependencies on stdio
 		xml_writer_file(void* file);
 
-		virtual void write(const void* data, size_t size);
+		virtual void write(const void* data, size_t size) PUGIXML_OVERRIDE;
 
 	private:
 		void* file;
@@ -288,7 +297,7 @@ namespace pugi
 		xml_writer_stream(std::basic_ostream<char, std::char_traits<char> >& stream);
 		xml_writer_stream(std::basic_ostream<wchar_t, std::char_traits<wchar_t> >& stream);
 
-		virtual void write(const void* data, size_t size);
+		virtual void write(const void* data, size_t size) PUGIXML_OVERRIDE;
 
 	private:
 		std::basic_ostream<char, std::char_traits<char> >* narrow_stream;
@@ -1214,7 +1223,7 @@ namespace pugi
 		explicit xpath_exception(const xpath_parse_result& result);
 
 		// Get error message
-		virtual const char* what() const throw();
+		virtual const char* what() const throw() PUGIXML_OVERRIDE;
 
 		// Get parse result
 		const xpath_parse_result& result() const;
-- 
cgit v1.2.3


From d0b0cc75ad1bc7c0c3226bc57d63095339579cbe Mon Sep 17 00:00:00 2001
From: Pavel Kryukov <kryukov@frtk.ru>
Date: Tue, 18 Oct 2016 00:53:00 +0300
Subject: Fix a comment before PUGIXML_OVERRIDE macro

---
 src/pugixml.hpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src')

diff --git a/src/pugixml.hpp b/src/pugixml.hpp
index 898dab8..c4d44e6 100644
--- a/src/pugixml.hpp
+++ b/src/pugixml.hpp
@@ -72,7 +72,7 @@
 #	endif
 #endif
 
-// If no API for functions is defined, assume default
+// If C++ is 2011 or higher, add 'override' qualifiers
 #ifndef PUGIXML_OVERRIDE
 #	if __cplusplus >= 201103
 #		define PUGIXML_OVERRIDE override
-- 
cgit v1.2.3