Reduce scope of variable

Change-Id: Ib3669c8946b431b845bcb217e7cf4a5f7a89177f
This commit is contained in:
Stephan Bergmann
2016-08-23 12:17:35 +02:00
parent 82e9566757
commit 2b4d13f135

View File

@@ -330,14 +330,12 @@ void myparser::traverse( xmlNodePtr parentNode )
xmlFree (branchxml);
xmlFree (idxml);
std::string hid;
if (branch.compare(0, 3, "hid") == 0)
{
size_t index = branch.find('/');
if (index != std::string::npos)
{
hid = branch.substr(1 + index);
auto hid = branch.substr(1 + index);
// one shall serve as a documentId
if (documentId.empty())
documentId = hid;