summaryrefslogtreecommitdiff
path: root/fxjs
diff options
context:
space:
mode:
Diffstat (limited to 'fxjs')
-rw-r--r--fxjs/cfxjse_arguments.cpp4
-rw-r--r--fxjs/cfxjse_arguments.h2
-rw-r--r--fxjs/cfxjse_value.cpp10
-rw-r--r--fxjs/cfxjse_value.h4
4 files changed, 10 insertions, 10 deletions
diff --git a/fxjs/cfxjse_arguments.cpp b/fxjs/cfxjse_arguments.cpp
index 75904cbbea..323134dcf5 100644
--- a/fxjs/cfxjse_arguments.cpp
+++ b/fxjs/cfxjse_arguments.cpp
@@ -32,8 +32,8 @@ int32_t CFXJSE_Arguments::GetInt32(int32_t index) const {
return static_cast<int32_t>((*m_pInfo)[index]->NumberValue());
}
-FX_FLOAT CFXJSE_Arguments::GetFloat(int32_t index) const {
- return static_cast<FX_FLOAT>((*m_pInfo)[index]->NumberValue());
+float CFXJSE_Arguments::GetFloat(int32_t index) const {
+ return static_cast<float>((*m_pInfo)[index]->NumberValue());
}
CFX_ByteString CFXJSE_Arguments::GetUTF8String(int32_t index) const {
diff --git a/fxjs/cfxjse_arguments.h b/fxjs/cfxjse_arguments.h
index 51e1981d03..4f18082f84 100644
--- a/fxjs/cfxjse_arguments.h
+++ b/fxjs/cfxjse_arguments.h
@@ -24,7 +24,7 @@ class CFXJSE_Arguments {
std::unique_ptr<CFXJSE_Value> GetValue(int32_t index) const;
bool GetBoolean(int32_t index) const;
int32_t GetInt32(int32_t index) const;
- FX_FLOAT GetFloat(int32_t index) const;
+ float GetFloat(int32_t index) const;
CFX_ByteString GetUTF8String(int32_t index) const;
CFXJSE_HostObject* GetObject(int32_t index,
CFXJSE_Class* pClass = nullptr) const;
diff --git a/fxjs/cfxjse_value.cpp b/fxjs/cfxjse_value.cpp
index 68c82e5deb..fb7fe20e21 100644
--- a/fxjs/cfxjse_value.cpp
+++ b/fxjs/cfxjse_value.cpp
@@ -13,8 +13,8 @@
namespace {
-double ftod(FX_FLOAT fNumber) {
- static_assert(sizeof(FX_FLOAT) == 4, "FX_FLOAT of incorrect size");
+double ftod(float fNumber) {
+ static_assert(sizeof(float) == 4, "float of incorrect size");
uint32_t nFloatBits = (uint32_t&)fNumber;
uint8_t nExponent = (uint8_t)(nFloatBits >> 23);
@@ -120,7 +120,7 @@ void CFXJSE_Value::SetDate(double dDouble) {
m_hValue.Reset(m_pIsolate, hDate);
}
-void CFXJSE_Value::SetFloat(FX_FLOAT fFloat) {
+void CFXJSE_Value::SetFloat(float fFloat) {
CFXJSE_ScopeUtil_IsolateHandle scope(m_pIsolate);
v8::Local<v8::Value> pValue = v8::Number::New(m_pIsolate, ftod(fFloat));
m_hValue.Reset(m_pIsolate, pValue);
@@ -442,11 +442,11 @@ bool CFXJSE_Value::ToBoolean() const {
return static_cast<bool>(hValue->BooleanValue());
}
-FX_FLOAT CFXJSE_Value::ToFloat() const {
+float CFXJSE_Value::ToFloat() const {
ASSERT(!m_hValue.IsEmpty());
CFXJSE_ScopeUtil_IsolateHandleRootContext scope(m_pIsolate);
v8::Local<v8::Value> hValue = v8::Local<v8::Value>::New(m_pIsolate, m_hValue);
- return static_cast<FX_FLOAT>(hValue->NumberValue());
+ return static_cast<float>(hValue->NumberValue());
}
double CFXJSE_Value::ToDouble() const {
diff --git a/fxjs/cfxjse_value.h b/fxjs/cfxjse_value.h
index f2ebdc1c25..31b751da1e 100644
--- a/fxjs/cfxjse_value.h
+++ b/fxjs/cfxjse_value.h
@@ -35,7 +35,7 @@ class CFXJSE_Value {
bool IsFunction() const;
bool IsDate() const;
bool ToBoolean() const;
- FX_FLOAT ToFloat() const;
+ float ToFloat() const;
double ToDouble() const;
int32_t ToInteger() const;
CFX_ByteString ToString() const;
@@ -50,7 +50,7 @@ class CFXJSE_Value {
void SetInteger(int32_t nInteger);
void SetDouble(double dDouble);
void SetString(const CFX_ByteStringC& szString);
- void SetFloat(FX_FLOAT fFloat);
+ void SetFloat(float fFloat);
void SetJSObject();
void SetObject(CFXJSE_HostObject* lpObject, CFXJSE_Class* pClass);