Index: base/values.cc |
diff --git a/base/values.cc b/base/values.cc |
index a4a6ff43ade187abe31a3df5bf5ed2d3faeada18..9c96f26a99e7be5566e5909281d4e7061c17fddd 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 { |