diff options
author | arv@chromium.org <arv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-01 01:02:07 +0000 |
---|---|---|
committer | arv@chromium.org <arv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-01 01:02:07 +0000 |
commit | fb534c949f92bec8c6312b58ffcc04c5dc488f2d (patch) | |
tree | 84384bdb8b06e62662ce1a5e9619ae455e9a69a8 /base/values.cc | |
parent | efeb669b05db99c54309771e4884b1a17d604a37 (diff) | |
download | chromium_src-fb534c949f92bec8c6312b58ffcc04c5dc488f2d.zip chromium_src-fb534c949f92bec8c6312b58ffcc04c5dc488f2d.tar.gz chromium_src-fb534c949f92bec8c6312b58ffcc04c5dc488f2d.tar.bz2 |
Rename Real* to Double* in values.* and dependent files
BUG=None
TEST=Compiles and passes all tests
Review URL: http://codereview.chromium.org/6248026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73232 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/values.cc')
-rw-r--r-- | base/values.cc | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/base/values.cc b/base/values.cc index a4a6ff4..9c96f26 100644 --- a/base/values.cc +++ b/base/values.cc @@ -80,7 +80,7 @@ FundamentalValue* Value::CreateIntegerValue(int in_value) { } // static -FundamentalValue* Value::CreateRealValue(double in_value) { +FundamentalValue* Value::CreateDoubleValue(double in_value) { return new FundamentalValue(in_value); } @@ -107,7 +107,7 @@ bool Value::GetAsInteger(int* out_value) const { return false; } -bool Value::GetAsReal(double* out_value) const { +bool Value::GetAsDouble(double* out_value) const { return false; } @@ -158,7 +158,7 @@ FundamentalValue::FundamentalValue(int in_value) } FundamentalValue::FundamentalValue(double in_value) - : Value(TYPE_REAL), real_value_(in_value) { + : Value(TYPE_DOUBLE), double_value_(in_value) { } FundamentalValue::~FundamentalValue() { @@ -176,10 +176,10 @@ bool FundamentalValue::GetAsInteger(int* out_value) const { return (IsType(TYPE_INTEGER)); } -bool FundamentalValue::GetAsReal(double* out_value) const { - if (out_value && IsType(TYPE_REAL)) - *out_value = real_value_; - return (IsType(TYPE_REAL)); +bool FundamentalValue::GetAsDouble(double* out_value) const { + if (out_value && IsType(TYPE_DOUBLE)) + *out_value = double_value_; + return (IsType(TYPE_DOUBLE)); } FundamentalValue* FundamentalValue::DeepCopy() const { @@ -190,8 +190,8 @@ FundamentalValue* FundamentalValue::DeepCopy() const { case TYPE_INTEGER: return CreateIntegerValue(integer_value_); - case TYPE_REAL: - return CreateRealValue(real_value_); + case TYPE_DOUBLE: + return CreateDoubleValue(double_value_); default: NOTREACHED(); @@ -212,9 +212,9 @@ bool FundamentalValue::Equals(const Value* other) const { int lhs, rhs; return GetAsInteger(&lhs) && other->GetAsInteger(&rhs) && lhs == rhs; } - case TYPE_REAL: { + case TYPE_DOUBLE: { double lhs, rhs; - return GetAsReal(&lhs) && other->GetAsReal(&rhs) && lhs == rhs; + return GetAsDouble(&lhs) && other->GetAsDouble(&rhs) && lhs == rhs; } default: NOTREACHED(); @@ -367,8 +367,8 @@ void DictionaryValue::SetInteger(const std::string& path, int in_value) { Set(path, CreateIntegerValue(in_value)); } -void DictionaryValue::SetReal(const std::string& path, double in_value) { - Set(path, CreateRealValue(in_value)); +void DictionaryValue::SetDouble(const std::string& path, double in_value) { + Set(path, CreateDoubleValue(in_value)); } void DictionaryValue::SetString(const std::string& path, @@ -430,13 +430,13 @@ bool DictionaryValue::GetInteger(const std::string& path, return value->GetAsInteger(out_value); } -bool DictionaryValue::GetReal(const std::string& path, - double* out_value) const { +bool DictionaryValue::GetDouble(const std::string& path, + double* out_value) const { Value* value; if (!Get(path, &value)) return false; - return value->GetAsReal(out_value); + return value->GetAsDouble(out_value); } bool DictionaryValue::GetString(const std::string& path, @@ -533,13 +533,13 @@ bool DictionaryValue::GetIntegerWithoutPathExpansion(const std::string& key, return value->GetAsInteger(out_value); } -bool DictionaryValue::GetRealWithoutPathExpansion(const std::string& key, - double* out_value) const { +bool DictionaryValue::GetDoubleWithoutPathExpansion(const std::string& key, + double* out_value) const { Value* value; if (!GetWithoutPathExpansion(key, &value)) return false; - return value->GetAsReal(out_value); + return value->GetAsDouble(out_value); } bool DictionaryValue::GetStringWithoutPathExpansion( @@ -742,12 +742,12 @@ bool ListValue::GetInteger(size_t index, int* out_value) const { return value->GetAsInteger(out_value); } -bool ListValue::GetReal(size_t index, double* out_value) const { +bool ListValue::GetDouble(size_t index, double* out_value) const { Value* value; if (!Get(index, &value)) return false; - return value->GetAsReal(out_value); + return value->GetAsDouble(out_value); } bool ListValue::GetString(size_t index, std::string* out_value) const { |