0
0
mirror of https://github.com/zeux/pugixml.git synced 2025-01-13 17:37:58 +08:00

Fix weak vtable warning regarding xml_writer

Using Apple clang (clang-1400.0.29.202) with `-Wweak-vtables` would produce the following warning:

'xml_writer' has no out-of-line virtual method definitions; its vtable will be emitted in every translation unit [-Wweak-vtables]
This commit is contained in:
Andy Maloney 2023-03-04 10:10:37 -05:00
parent f4b89469b3
commit 058fc601a1
2 changed files with 5 additions and 1 deletions

View File

@ -5111,6 +5111,10 @@ PUGI_IMPL_NS_END
namespace pugi
{
PUGI_IMPL_FN xml_writer::~xml_writer()
{
}
PUGI_IMPL_FN xml_writer_file::xml_writer_file(void* file_): file(file_)
{
}

View File

@ -324,7 +324,7 @@ namespace pugi
class PUGIXML_CLASS xml_writer
{
public:
virtual ~xml_writer() {}
virtual ~xml_writer();
// Write memory chunk into stream/file/whatever
virtual void write(const void* data, size_t size) = 0;