0
0
mirror of https://github.com/zeux/pugixml.git synced 2025-01-17 04:50:23 +08:00

Remove redundant branches

These used to result in better codegen for unknown reasons, but this is no
longer the case.
This commit is contained in:
Arseny Kapoulkine 2014-11-05 08:52:32 +01:00
parent 3950ee0433
commit 2cb5d40956

View File

@ -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<xml_memory_page*>(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;