Kaydet (Commit) 2b4d13f1 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Reduce scope of variable

Change-Id: Ib3669c8946b431b845bcb217e7cf4a5f7a89177f
üst 82e95667
...@@ -330,14 +330,12 @@ void myparser::traverse( xmlNodePtr parentNode ) ...@@ -330,14 +330,12 @@ void myparser::traverse( xmlNodePtr parentNode )
xmlFree (branchxml); xmlFree (branchxml);
xmlFree (idxml); xmlFree (idxml);
std::string hid;
if (branch.compare(0, 3, "hid") == 0) if (branch.compare(0, 3, "hid") == 0)
{ {
size_t index = branch.find('/'); size_t index = branch.find('/');
if (index != std::string::npos) if (index != std::string::npos)
{ {
hid = branch.substr(1 + index); auto hid = branch.substr(1 + index);
// one shall serve as a documentId // one shall serve as a documentId
if (documentId.empty()) if (documentId.empty())
documentId = hid; documentId = hid;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment