From d4c456bdef566128ed18bcf066b430247ddb60b1 Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Tue, 7 Feb 2017 20:34:49 -0800 Subject: Add invalid type assertion for offset_debug This will make sure we don't forget to implement offset_debug for new node types if they ever happen (really it's mostly for consistency). --- src/pugixml.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pugixml.cpp b/src/pugixml.cpp index 1a69ac6..7368184 100644 --- a/src/pugixml.cpp +++ b/src/pugixml.cpp @@ -6286,6 +6286,7 @@ namespace pugi return _root->value && (_root->header & impl::xml_memory_page_value_allocated_or_shared_mask) == 0 ? _root->value - doc.buffer : -1; default: + assert(false && "Invalid node type"); return -1; } } -- cgit v1.2.3