From 2cb5d409565d8ee0f2e03312b5699ef454f8d70c Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Wed, 5 Nov 2014 08:52:32 +0100 Subject: Remove redundant branches These used to result in better codegen for unknown reasons, but this is no longer the case. --- src/pugixml.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/pugixml.cpp b/src/pugixml.cpp index c8de68a..d7d25ba 100644 --- a/src/pugixml.cpp +++ b/src/pugixml.cpp @@ -286,8 +286,6 @@ PUGI__NS_BEGIN { static xml_memory_page* construct(void* memory) { - if (!memory) return 0; //$ redundant, left for performance - xml_memory_page* result = static_cast(memory); result->allocator = 0; @@ -2670,15 +2668,11 @@ PUGI__NS_BEGIN a->name = s; // Save the offset. PUGI__SCANWHILE_UNROLL(PUGI__IS_CHARTYPE(ss, ct_symbol)); // Scan for a terminator. - PUGI__CHECK_ERROR(status_bad_attribute, s); //$ redundant, left for performance - PUGI__ENDSEG(); // Save char in 'ch', terminate & step over. - PUGI__CHECK_ERROR(status_bad_attribute, s); //$ redundant, left for performance if (PUGI__IS_CHARTYPE(ch, ct_space)) { PUGI__SKIPWS(); // Eat any whitespace. - PUGI__CHECK_ERROR(status_bad_attribute, s); //$ redundant, left for performance ch = *s; ++s; -- cgit v1.2.3