diff options
author | Jesus Fernandez <jesus.fernandez@qt.io> | 2017-11-22 14:04:47 +0100 |
---|---|---|
committer | Jesus Fernandez <Jesus.Fernandez@qt.io> | 2017-11-23 07:54:42 +0000 |
commit | 9eb58fabd550b59e3c89834624b077a92a2a4475 (patch) | |
tree | d32eb9cc6b9a7ef6dd57224f53beedce1a262e32 | |
parent | d5dda668b174ec59a3856b3bad9295cead5a6a6c (diff) |
Change variable name
It improves the readability of the code.
Change-Id: Ice1021f23e439c74d1d8817bd2c432c7161c352b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
-rw-r--r-- | src/plugins/platforms/webgl/qwebglcontext.cpp | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/src/plugins/platforms/webgl/qwebglcontext.cpp b/src/plugins/platforms/webgl/qwebglcontext.cpp index 6265f21..6dfdc9b 100644 --- a/src/plugins/platforms/webgl/qwebglcontext.cpp +++ b/src/plugins/platforms/webgl/qwebglcontext.cpp @@ -246,32 +246,33 @@ static void setVertexAttribs(QWebGLFunctionCall *event, GLsizei count) } } -template<class POINTER, class SIZE> -inline QWebGLFunctionCall *addHelper(QWebGLFunctionCall *e, const QPair<POINTER*, SIZE> &elements) +template<class POINTER, class COUNT> +inline QWebGLFunctionCall *addHelper(QWebGLFunctionCall *event, + const QPair<POINTER, COUNT> &elements) { - if (e) { + if (event) { for (auto i = 0; i < elements.second; ++i) - e->add(elements.first[i]); + event->add(elements.first[i]); } - return e; + return event; } template<class T> -inline QWebGLFunctionCall *addHelper(QWebGLFunctionCall *e, const T &value) +inline QWebGLFunctionCall *addHelper(QWebGLFunctionCall *event, const T &value) { - if (e) - e->add(value); - return e; + if (event) + event->add(value); + return event; } template<class T, class... Ts> -inline QWebGLFunctionCall *addHelper(QWebGLFunctionCall *e, const T &value, const Ts&... rest) +inline QWebGLFunctionCall *addHelper(QWebGLFunctionCall *event, const T &value, const Ts&... rest) { - if (e) { - e->add(value); - addHelper(e, rest...); + if (event) { + event->add(value); + addHelper(event, rest...); } - return e; + return event; } template<class T> |