From e5048ec71bf114c351c62844b7603893195df4d4 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 31 Jul 2008 17:48:29 -0400 Subject: Change many uses of for+iterator to use Boost.Foreach. --- option.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'option.cc') 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'; -- cgit v1.2.3