Browse Source

[2726] Reduce variable scope

Michal 'vorner' Vaner 12 years ago
parent
commit
6e4e55d995
1 changed files with 1 additions and 2 deletions
  1. 1 2
      src/lib/cc/data.cc

+ 1 - 2
src/lib/cc/data.cc

@@ -688,10 +688,9 @@ NullElement::toJSON(std::ostream& ss) const {
 void
 StringElement::toJSON(std::ostream& ss) const {
     ss << "\"";
-    char c;
     const std::string& str = stringValue();
     for (size_t i = 0; i < str.size(); ++i) {
-        c = str[i];
+        char c = str[i];
         // Escape characters as defined in JSON spec
         // Note that we do not escape forward slash; this
         // is allowed, but not mandatory.