From 61a94d6223a422abae0396c931c11517ba05774b Mon Sep 17 00:00:00 2001 From: "arseny.kapoulkine" Date: Sun, 29 Aug 2010 16:58:57 +0000 Subject: XPath: Fixed variable memory leaks for MSVC6 git-svn-id: http://pugixml.googlecode.com/svn/trunk@704 99668b35-9821-0410-8761-19e4c4f06640 --- src/pugixml.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/pugixml.cpp b/src/pugixml.cpp index 40acb64..8ac5627 100644 --- a/src/pugixml.cpp +++ b/src/pugixml.cpp @@ -5543,9 +5543,9 @@ namespace } } - template void delete_xpath_variable(xpath_variable* var) + template void delete_xpath_variable(T* var) { - static_cast(var)->~T(); + var->~T(); global_deallocate(var); } @@ -5554,19 +5554,19 @@ namespace switch (type) { case xpath_type_node_set: - delete_xpath_variable(var); + delete_xpath_variable(static_cast(var)); break; case xpath_type_number: - delete_xpath_variable(var); + delete_xpath_variable(static_cast(var)); break; case xpath_type_string: - delete_xpath_variable(var); + delete_xpath_variable(static_cast(var)); break; case xpath_type_boolean: - delete_xpath_variable(var); + delete_xpath_variable(static_cast(var)); break; default: -- cgit v1.2.3