From 21301cfe80693f79adf1231ad3e1fe3315076150 Mon Sep 17 00:00:00 2001 From: Junep Date: Wed, 28 Aug 2024 14:55:23 +0900 Subject: [PATCH] fix: cast float to double --- cxx/UnistylesImpl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cxx/UnistylesImpl.cpp b/cxx/UnistylesImpl.cpp index e010a852..98d24ecb 100644 --- a/cxx/UnistylesImpl.cpp +++ b/cxx/UnistylesImpl.cpp @@ -234,11 +234,11 @@ jsi::Value UnistylesRuntime::getNavigationBar(jsi::Runtime& rt, std::string fnNa } jsi::Value UnistylesRuntime::getPixelRatio(jsi::Runtime& rt, std::string fnName) { - return jsi::Value(roundf(this->pixelRatio * 100)/ 100); + return jsi::Value(static_cast(roundf(this->pixelRatio * 100)/ 100)); } jsi::Value UnistylesRuntime::getFontScale(jsi::Runtime& rt, std::string fnName) { - return jsi::Value(roundf(this->fontScale * 100) / 100); + return jsi::Value(static_cast(roundf(this->fontScale * 100) / 100)); } std::optional UnistylesRuntime::setThemes(jsi::Runtime& rt, const jsi::Value& value) {