aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-05-05 01:50:35 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-05-05 01:50:35 +0000
commit12c24d0e1654147601c1f182329d31c7f89d27de (patch)
treec32b689f483b69748d80a64d136d9f5ab6e7f2ac
parent3f3a02e073fd9f46db3698270bfc928711e73c7b (diff)
downloadpaludis-12c24d0e1654147601c1f182329d31c7f89d27de.tar.gz
paludis-12c24d0e1654147601c1f182329d31c7f89d27de.tar.xz
tweak
-rw-r--r--paludis/repositories/e/ebuild_entries.cc19
1 files changed, 10 insertions, 9 deletions
diff --git a/paludis/repositories/e/ebuild_entries.cc b/paludis/repositories/e/ebuild_entries.cc
index 118ad1e..5122e55 100644
--- a/paludis/repositories/e/ebuild_entries.cc
+++ b/paludis/repositories/e/ebuild_entries.cc
@@ -287,15 +287,16 @@ namespace
std::back_inserter(lower_i), &::tolower);
if (0 == lower_i.compare(0, lower_x.length() + 1, lower_x + expand_sep,
0, lower_x.length() + 1))
- expand_vars->insert(stringify(*x), "");
-
- Map<std::string, std::string>::ConstIterator f(expand_vars->find(stringify(*x)));
- std::string value;
- if (expand_vars->end() != f)
- value = f->second;
- value.append(stringify(*i).substr(lower_x.length() + 1) + " ");
- expand_vars->erase(f);
- expand_vars->insert(stringify(*x), value);
+ {
+ Map<std::string, std::string>::ConstIterator f(expand_vars->find(stringify(*x)));
+ std::string value;
+ if (expand_vars->end() != f)
+ value = f->second + " ";
+ value.append(stringify(*i).substr(lower_x.length() + 1));
+ if (expand_vars->end() != f)
+ expand_vars->erase(f);
+ expand_vars->insert(stringify(*x), value);
+ }
}
}
else