diff options
author | Dan Gudmundsson <[email protected]> | 2015-06-04 15:57:37 +0200 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2015-06-05 08:24:06 +0200 |
commit | 38cb91a91ac2d8f3231761b98909ff89416a4942 (patch) | |
tree | 998895fdc91242be2cb9818f25c2b91c9023280f /lib/wx/c_src/wxe_gl.cpp | |
parent | 0b66c5c60f2f7103c1025f1dd16f88918be28f48 (diff) | |
download | otp-38cb91a91ac2d8f3231761b98909ff89416a4942.tar.gz otp-38cb91a91ac2d8f3231761b98909ff89416a4942.tar.bz2 otp-38cb91a91ac2d8f3231761b98909ff89416a4942.zip |
wx: Optimize binary args
Diffstat (limited to 'lib/wx/c_src/wxe_gl.cpp')
-rw-r--r-- | lib/wx/c_src/wxe_gl.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/wx/c_src/wxe_gl.cpp b/lib/wx/c_src/wxe_gl.cpp index 7921c1d52a..347718ab14 100644 --- a/lib/wx/c_src/wxe_gl.cpp +++ b/lib/wx/c_src/wxe_gl.cpp @@ -132,7 +132,7 @@ void deleteActiveGL(wxGLCanvas *canvas) } } -void gl_dispatch(int op, char *bp,ErlDrvTermData caller,WXEBinRef *bins[]){ +void gl_dispatch(int op, char *bp,ErlDrvTermData caller,WXEBinRef *bins){ if(caller != gl_active) { wxGLCanvas * current = glc[caller]; if(current) { @@ -153,12 +153,12 @@ void gl_dispatch(int op, char *bp,ErlDrvTermData caller,WXEBinRef *bins[]){ char * bs[3]; int bs_sz[3]; for(int i=0; i<3; i++) { - if(bins[i]) { - bs[i] = bins[i]->base; - bs_sz[i] = bins[i]->size; + if(bins[i].from) { + bs[i] = bins[i].base; + bs_sz[i] = bins[i].size; } - else - bs[i] = NULL; + else + break; } wxe_gl_dispatch(op, bp, WXE_DRV_PORT_HANDLE, caller, bs, bs_sz); } |