diff options
author | Dan Gudmundsson <[email protected]> | 2015-05-20 12:53:44 +0200 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2015-06-01 13:07:33 +0200 |
commit | 01c0f71f9e963b2c6fbc9417c8a414345d524609 (patch) | |
tree | dec0a9595b9ee827633ba7ea05af8a40526a2e9f /lib/wx/api_gen/wx_gen_cpp.erl | |
parent | 7819974d320c8fdf4994a6b76a3ad2d686065a6b (diff) | |
download | otp-01c0f71f9e963b2c6fbc9417c8a414345d524609.tar.gz otp-01c0f71f9e963b2c6fbc9417c8a414345d524609.tar.bz2 otp-01c0f71f9e963b2c6fbc9417c8a414345d524609.zip |
wx: Optimize event and return value construction
Preallocated an rt array of 64 items (which covers 99%) of the calls
and thus avoids allocation and copying in most cases.
Diffstat (limited to 'lib/wx/api_gen/wx_gen_cpp.erl')
-rw-r--r-- | lib/wx/api_gen/wx_gen_cpp.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/wx/api_gen/wx_gen_cpp.erl b/lib/wx/api_gen/wx_gen_cpp.erl index 7067b11465..8cbc448563 100644 --- a/lib/wx/api_gen/wx_gen_cpp.erl +++ b/lib/wx/api_gen/wx_gen_cpp.erl @@ -207,7 +207,7 @@ gen_funcs(Defs) -> " }~n"), w(" case WXE_BIN_INCR:~n driver_binary_inc_refc(Ecmd.bin[0]->bin);~n break;~n",[]), w(" case WXE_BIN_DECR:~n driver_binary_dec_refc(Ecmd.bin[0]->bin);~n break;~n",[]), - w(" case WXE_INIT_OPENGL:~n wxe_initOpenGL(rt, bp);~n break;~n",[]), + w(" case WXE_INIT_OPENGL:~n wxe_initOpenGL(&rt, bp);~n break;~n",[]), Res = [gen_class(Class) || Class <- Defs], |