Commit 15364a52 authored by Mukund Sivaraman's avatar Mukund Sivaraman
Browse files

[2053] Remove loop to locate the start point

parent 6c78bb40
......@@ -128,7 +128,8 @@ LabelSequence::toText(bool omit_final_dot) const {
return (".");
}
Name::NameString::const_iterator np = name_.ndata_.begin();
Name::NameString::const_iterator np = name_.ndata_.begin() +
name_.offsets_[first_label_];
const Name::NameString::const_iterator np_end = name_.ndata_.end();
// use for integrity check
unsigned int labels = last_label_ - first_label_;
......@@ -140,11 +141,6 @@ LabelSequence::toText(bool omit_final_dot) const {
std::string result;
result.reserve(name_.length_);
for (unsigned int i = 0; i < first_label_; i++) {
count = *np++;
np += count;
}
while (np != np_end) {
labels--;
count = *np++;
......
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