Skip to content
This repository was archived by the owner on Oct 18, 2023. It is now read-only.

Commit c093442

Browse files
committed
src: use IntConverter instead of Integer::New
1 parent 9c8235b commit c093442

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

cc/core/core.cc

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,7 @@ NAN_METHOD(Core::PolarToCartAsync) {
164164

165165
NAN_METHOD(Core::GetNumThreads) {
166166
FF_METHOD_CONTEXT("Core::GetNumThreads");
167-
v8::Local<v8::Integer> ret = v8::Integer::New(v8::Isolate::GetCurrent(),
168-
cv::getNumThreads());
169-
FF_RETURN(ret);
167+
FF_RETURN(IntConverter::wrap(cv::getNumThreads()));
170168
}
171169

172170
NAN_METHOD(Core::SetNumThreads) {
@@ -183,7 +181,5 @@ NAN_METHOD(Core::SetNumThreads) {
183181

184182
NAN_METHOD(Core::GetThreadNum) {
185183
FF_METHOD_CONTEXT("Core::GetNumThreads");
186-
v8::Local<v8::Integer> ret = v8::Integer::New(v8::Isolate::GetCurrent(),
187-
cv::getThreadNum());
188-
FF_RETURN(ret);
184+
FF_RETURN(IntConverter::wrap(cv::getThreadNum()));
189185
}

0 commit comments

Comments
 (0)