diff options
author | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2017-02-01 21:05:37 -0800 |
---|---|---|
committer | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2017-02-01 21:05:37 -0800 |
commit | 0e3ccc73965b10c078fba31967c5d5500dade767 (patch) | |
tree | b372a6cdee8f466ed0ff930b6d640bbebed462bc | |
parent | e56686f1e57236d4b1c5fb3f7de99ddfbf2a016b (diff) |
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.
-rw-r--r-- | src/pugixml.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pugixml.cpp b/src/pugixml.cpp index 8f93819..67e0cfe 100644 --- a/src/pugixml.cpp +++ b/src/pugixml.cpp @@ -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); |