summaryrefslogtreecommitdiff
path: root/src/base/stats/text.cc
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2014-09-20 17:17:49 -0400
committerAndreas Hansson <andreas.hansson@arm.com>2014-09-20 17:17:49 -0400
commit0fa128bbd0a53a3428fa2028b8754e15c9ef7c38 (patch)
tree30e2598a67f540e97cdbaf1cf7f5092b974d9d3c /src/base/stats/text.cc
parentb2c2e67468bba6dbbbfb6856ca94fdcfa1492258 (diff)
downloadgem5-0fa128bbd0a53a3428fa2028b8754e15c9ef7c38.tar.xz
base: Clean up redundant string functions and use C++11
This patch does a bit of housekeeping on the string helper functions and relies on the C++11 standard library where possible. It also does away with our custom string hash as an implementation is already part of the standard library.
Diffstat (limited to 'src/base/stats/text.cc')
-rw-r--r--src/base/stats/text.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/base/stats/text.cc b/src/base/stats/text.cc
index 2c5b004be..efe43c602 100644
--- a/src/base/stats/text.cc
+++ b/src/base/stats/text.cc
@@ -284,7 +284,7 @@ VectorPrint::operator()(std::ostream &stream) const
// the case where there are no subnames) and append it to the
// base name.
if (forceSubnames)
- print.name = base + (havesub ? subnames[0] : to_string(0));
+ print.name = base + (havesub ? subnames[0] : std::to_string(0));
print.value = vec[0];
print(stream);
return;
@@ -300,7 +300,7 @@ VectorPrint::operator()(std::ostream &stream) const
if (havesub && (i >= subnames.size() || subnames[i].empty()))
continue;
- print.name = base + (havesub ? subnames[i] : to_string(i));
+ print.name = base + (havesub ? subnames[i] : std::to_string(i));
print.desc = subdescs.empty() ? desc : subdescs[i];
print.update(vec[i], _total);
@@ -355,7 +355,7 @@ DistPrint::DistPrint(const Text *text, const VectorDistInfo &info, int i)
init(text, info);
name = info.name + "_" +
- (info.subnames[i].empty() ? (to_string(i)) : info.subnames[i]);
+ (info.subnames[i].empty() ? (std::to_string(i)) : info.subnames[i]);
if (!info.subdescs[i].empty())
desc = info.subdescs[i];
@@ -605,7 +605,7 @@ Text::visit(const Vector2dInfo &info)
}
print.name = info.name + "_" +
- (havesub ? info.subnames[i] : to_string(i));
+ (havesub ? info.subnames[i] : std::to_string(i));
print.desc = info.desc;
print.vec = yvec;
print.total = total;