diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2013-09-04 21:50:27 -0700 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-05 23:38:30 +0200 |
commit | efb24d1b7dfa9028cb53a464dd3bd1cbbfe5fc2c (patch) | |
tree | e92affb68acb01bafccb26ed684c3483e9da1112 /src | |
parent | 21a08ccde3c7c2dc69e06b714549585bbf39b5c3 (diff) |
Disable the isPowerOfTwo functions that are only used with OpenGL ES 2
Found by ICC 14. This warning is not made an error because ICC is too
chatty when it comes to detecting unused functions. In this case,
however, it is right.
qsgtexturematerial.cpp(49): warning #177: function "isPowerOfTwo" was declared but never referenced
qsgtexture.cpp(84): warning #177: function "isPowerOfTwo" was declared but never referenced
qsgdefaultimagenode.cpp(368): warning #177: function "isPowerOfTwo" was declared but never referenced
Change-Id: I6c96dad3e1236fd33a02232f886ca33fa2b21258
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/quick/scenegraph/qsgdefaultimagenode.cpp | 2 | ||||
-rw-r--r-- | src/quick/scenegraph/util/qsgtexture.cpp | 2 | ||||
-rw-r--r-- | src/quick/scenegraph/util/qsgtexturematerial.cpp | 2 |
3 files changed, 6 insertions, 0 deletions
diff --git a/src/quick/scenegraph/qsgdefaultimagenode.cpp b/src/quick/scenegraph/qsgdefaultimagenode.cpp index c53039c553..e937f21395 100644 --- a/src/quick/scenegraph/qsgdefaultimagenode.cpp +++ b/src/quick/scenegraph/qsgdefaultimagenode.cpp @@ -365,11 +365,13 @@ void QSGDefaultImageNode::preprocess() markDirty(DirtyMaterial); } +#ifdef QT_OPENGL_ES_2 inline static bool isPowerOfTwo(int x) { // Assumption: x >= 1 return x == (x & -x); } +#endif namespace { struct X { float x, tx; }; diff --git a/src/quick/scenegraph/util/qsgtexture.cpp b/src/quick/scenegraph/util/qsgtexture.cpp index f17aa59e3e..6a6bcbf7f8 100644 --- a/src/quick/scenegraph/util/qsgtexture.cpp +++ b/src/quick/scenegraph/util/qsgtexture.cpp @@ -81,11 +81,13 @@ static QElapsedTimer qsg_renderer_timer; QT_BEGIN_NAMESPACE +#if !defined(QT_NO_DEBUG) && defined(QT_OPENGL_ES_2) inline static bool isPowerOfTwo(int x) { // Assumption: x >= 1 return x == (x & -x); } +#endif QSGTexturePrivate::QSGTexturePrivate() : wrapChanged(false) diff --git a/src/quick/scenegraph/util/qsgtexturematerial.cpp b/src/quick/scenegraph/util/qsgtexturematerial.cpp index 87414766e3..0abfcd021b 100644 --- a/src/quick/scenegraph/util/qsgtexturematerial.cpp +++ b/src/quick/scenegraph/util/qsgtexturematerial.cpp @@ -46,11 +46,13 @@ QT_BEGIN_NAMESPACE +#ifdef QT_OPENGL_ES_2 inline static bool isPowerOfTwo(int x) { // Assumption: x >= 1 return x == (x & -x); } +#endif const char qt_scenegraph_texture_material_vertex_code[] = "uniform highp mat4 qt_Matrix; \n" |