summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/javascript/JS_Value.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-07-23 13:26:26 -0700
committerTom Sepez <tsepez@chromium.org>2015-07-23 13:26:26 -0700
commit320b2313d19869333ed453af546e61a9fc2b81c9 (patch)
tree25f2eb8a0991ac485ca6354f0d3caf7fd775e732 /fpdfsdk/src/javascript/JS_Value.cpp
parent065e9321b84fc0490f3da9099e8840c65e06868d (diff)
downloadpdfium-320b2313d19869333ed453af546e61a9fc2b81c9.tar.xz
FX_BOOL considered harmful, part 2.
Fully automatic change, execpt for cleanup in fx_system.h R=thestig@chromium.org Review URL: https://codereview.chromium.org/1254703002 .
Diffstat (limited to 'fpdfsdk/src/javascript/JS_Value.cpp')
-rw-r--r--fpdfsdk/src/javascript/JS_Value.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/fpdfsdk/src/javascript/JS_Value.cpp b/fpdfsdk/src/javascript/JS_Value.cpp
index 058f2eaf45..611b1112a0 100644
--- a/fpdfsdk/src/javascript/JS_Value.cpp
+++ b/fpdfsdk/src/javascript/JS_Value.cpp
@@ -256,45 +256,45 @@ FXJSVALUETYPE CJS_Value::GetType() const
return VT_unknown;
}
-FX_BOOL CJS_Value::IsArrayObject() const
+bool CJS_Value::IsArrayObject() const
{
- if(m_pValue.IsEmpty()) return FALSE;
+ if(m_pValue.IsEmpty()) return false;
return m_pValue->IsArray();
}
-FX_BOOL CJS_Value::IsDateObject() const
+bool CJS_Value::IsDateObject() const
{
- if(m_pValue.IsEmpty()) return FALSE;
+ if(m_pValue.IsEmpty()) return false;
return m_pValue->IsDate();
}
//CJS_Value::operator CJS_Array()
-FX_BOOL CJS_Value::ConvertToArray(CJS_Array &array) const
+bool CJS_Value::ConvertToArray(CJS_Array &array) const
{
if (IsArrayObject())
{
array.Attach(JS_ToArray(m_isolate, m_pValue));
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-FX_BOOL CJS_Value::ConvertToDate(CJS_Date &date) const
+bool CJS_Value::ConvertToDate(CJS_Date &date) const
{
// if (GetType() == VT_date)
// {
// date = (double)(*this);
-// return TRUE;
+// return true;
// }
if (IsDateObject())
{
date.Attach(m_pValue);
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
/* ---------------------------- CJS_PropValue ---------------------------- */
@@ -314,12 +314,12 @@ CJS_PropValue::~CJS_PropValue()
{
}
-FX_BOOL CJS_PropValue::IsSetting()
+bool CJS_PropValue::IsSetting()
{
return m_bIsSetting;
}
-FX_BOOL CJS_PropValue::IsGetting()
+bool CJS_PropValue::IsGetting()
{
return !m_bIsSetting;
}
@@ -480,9 +480,9 @@ void CJS_Array::Attach(v8::Local<v8::Array> pArray)
m_pArray = pArray;
}
-FX_BOOL CJS_Array::IsAttached()
+bool CJS_Array::IsAttached()
{
- return FALSE;
+ return false;
}
void CJS_Array::GetElement(unsigned index,CJS_Value &value)
@@ -543,9 +543,9 @@ CJS_Date::~CJS_Date()
{
}
-FX_BOOL CJS_Date::IsValidDate()
+bool CJS_Date::IsValidDate()
{
- if(m_pDate.IsEmpty()) return FALSE;
+ if(m_pDate.IsEmpty()) return false;
return !JS_PortIsNan(JS_ToNumber(m_isolate, m_pDate));
}