summaryrefslogtreecommitdiff
path: root/option.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2008-07-31 17:48:29 -0400
committerJohn Wiegley <johnw@newartisans.com>2008-07-31 17:48:29 -0400
commite5048ec71bf114c351c62844b7603893195df4d4 (patch)
tree4153105f62fc6a244811df3c2e34366344c25792 /option.cc
parent99313ebc6c3779f692f9f1bd70cc69a236f5eb78 (diff)
downloadfork-ledger-e5048ec71bf114c351c62844b7603893195df4d4.tar.gz
fork-ledger-e5048ec71bf114c351c62844b7603893195df4d4.tar.bz2
fork-ledger-e5048ec71bf114c351c62844b7603893195df4d4.zip
Change many uses of for+iterator to use Boost.Foreach.
Diffstat (limited to 'option.cc')
-rw-r--r--option.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/option.cc b/option.cc
index b3673633..0581dab5 100644
--- a/option.cc
+++ b/option.cc
@@ -41,11 +41,11 @@ namespace {
char buf[128];
std::strcpy(buf, "option_");
char * p = &buf[7];
- for (const char * q = name.c_str(); *q; q++) {
- if (*q == '-')
+ foreach (char ch, name) {
+ if (ch == '-')
*p++ = '_';
else
- *p++ = *q;
+ *p++ = ch;
}
*p = '\0';