Commit 0e3571f3 authored by sque@chromium.org's avatar sque@chromium.org

chromeos: remove static modifier in ToString func

BUG=chromium-os:16558
TEST=none
Signed-off-by: default avatarSimon Que <sque@chromium.org>

R=satorux@chromium.org,stevenjb@chromium.org,thakis@chromium.org


Review URL: http://codereview.chromium.org/8616003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111056 0039d316-1c4b-4281-b951-d872f2087c98
parent 08745329
......@@ -31,10 +31,8 @@ PowerSupplyStatus::PowerSupplyStatus()
battery_percentage(0) {
}
const std::string& PowerSupplyStatus::ToString() const {
// TODO(thakis): This looks weird. This should probably not be static, and
// the function should just return a string by value.
CR_DEFINE_STATIC_LOCAL(std::string, result, ());
std::string PowerSupplyStatus::ToString() const {
std::string result;
base::StringAppendF(&result,
"line_power_on = %s ",
line_power_on ? "true" : "false");
......
......@@ -30,7 +30,7 @@ struct PowerSupplyStatus {
double battery_percentage;
PowerSupplyStatus();
const std::string& ToString() const;
std::string ToString() const;
};
// Callback used for processing the idle time. The int64 param is the number of
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment