0
0
mirror of https://github.com/zeux/pugixml.git synced 2025-01-14 09:57:57 +08:00

Remove redundant branch from xml_node::path()

The code works fine regardless of the *j->name check, and omitting this
makes the code more symmetric between the "count" and "write" stage;
additionally this improves coverage - due to how strcpy_insitu works
it's not really possible to get an empty non-NULL name in the node.
This commit is contained in:
Arseny Kapoulkine 2017-02-01 21:05:37 -08:00
parent e56686f1e5
commit 0e3ccc7396

View File

@ -6113,7 +6113,7 @@ namespace pugi
if (j != _root)
result[--offset] = delimiter;
if (j->name && *j->name)
if (j->name)
{
size_t length = impl::strlength(j->name);