diff options
author | grt@chromium.org <grt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-21 07:48:58 +0000 |
---|---|---|
committer | grt@chromium.org <grt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-21 07:48:58 +0000 |
commit | 75874a8a5b8566809541ff1c64dc57048af8e4d5 (patch) | |
tree | da05868d0fd58e44788bf8c5d556419b0797ff83 /base | |
parent | 4fe960cbc1f412e6644a7badf13341a10ebb245e (diff) | |
download | chromium_src-75874a8a5b8566809541ff1c64dc57048af8e4d5.zip chromium_src-75874a8a5b8566809541ff1c64dc57048af8e4d5.tar.gz chromium_src-75874a8a5b8566809541ff1c64dc57048af8e4d5.tar.bz2 |
Move std::string instance inside of loop.
This is a followup change to r235191 resulting from a chromium-dev
discussion.
BUG=None
Review URL: https://codereview.chromium.org/78593002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236447 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/metrics/statistics_recorder.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/base/metrics/statistics_recorder.cc b/base/metrics/statistics_recorder.cc index 1e28fbe..2753c0b2 100644 --- a/base/metrics/statistics_recorder.cc +++ b/base/metrics/statistics_recorder.cc @@ -179,7 +179,6 @@ std::string StatisticsRecorder::ToJSON(const std::string& query) { Histograms snapshot; GetSnapshot(query, &snapshot); output += "\"histograms\":["; - std::string json; bool first_histogram = true; for (Histograms::const_iterator it = snapshot.begin(); it != snapshot.end(); ++it) { @@ -187,7 +186,7 @@ std::string StatisticsRecorder::ToJSON(const std::string& query) { first_histogram = false; else output += ","; - json.clear(); + std::string json; (*it)->WriteJSON(&json); output += json; } |