Skip to content

Commit b53eb44

Browse files
authored
Update HUI.hh
1 parent 98e7db9 commit b53eb44

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

HUI.hh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ void HUI_WebView_call_js_async (HUI_WebView object, const char* code, voi
356356
static_cast<HUI::WebView*>(object)->call_js(code, cpp_callback);
357357
}
358358
const char* HUI_WebView_call_native (HUI_WebView object, void(*handler)(char**,int,void*), void* data, const char* process_args){
359-
auto cpp_handler = [data,handler](std::vector<std::string> args)->void{
359+
auto cpp_handler = [handler,&data](std::vector<std::string> args)->void{
360360
// from <https://stackoverflow.com/a/26032303/21213243>
361361
std::vector<char*> c_args;
362362
c_args.reserve(args.size());
@@ -545,28 +545,28 @@ tested with: <https://jsbench.me>
545545
---
546546
547547
document.querySelectorAll("body div:nth-of-type(3)").forEach(function(e){e.innerText = "e";})
548-
[261 tis. ops/s ± 6.61% ~ 15.62 % slower]
548+
[261 tis. ops/s ± 6.61% ~ 15.62 % slower]
549549
550550
(function(e){e.innerText = "e";})(document.querySelectorAll("body div")[2])
551-
[299 tis. ops/s ± 1.55% ~ 3.39 % slower]
551+
[299 tis. ops/s ± 1.55% ~ 3.39 % slower]
552552
553553
document.querySelectorAll("body div")[2].innerText = "e";
554-
[303 tis. ops/s ± 2.73% ~ Fastest]
554+
[303 tis. ops/s ± 2.73% ~ Fastest]
555555
556556
let q = document.querySelectorAll("body div:nth-of-type(3)");
557557
if (q.length == 1) {q[0].innerText = "e";}
558558
else {q.forEach(function(e){e.innerText = "e";})}
559-
[309 tis. ops/s ± 1.07% ~ Fastest]
559+
[309 tis. ops/s ± 1.07% ~ Fastest]
560560
561561
---
562562
563563
document.querySelectorAll("body div").forEach(function(e){e.innerText = "e";})
564-
[308 tis. ops/s ± 2.95% ~ 18.12 % slower]
564+
[308 tis. ops/s ± 2.95% ~ 18.12 % slower]
565565
566566
let q = document.querySelectorAll("body div");
567567
if (q.length == 1) {q[0].innerText = "e";}
568568
else {q.forEach(function(e){e.innerText = "e";})}
569-
[377 tis. ops/s ± 2.9% ~ Fastest]
569+
[377 tis. ops/s ± 2.9% ~ Fastest]
570570
571571
572572
@@ -596,4 +596,4 @@ void WebView::call_js (std::string code, std::function<void(std::string)> return
596596
#endif // _hui_webview_use_common_code
597597

598598

599-
#endif // _HUI_hh_
599+
#endif // _HUI_hh_

0 commit comments

Comments
 (0)