summaryrefslogtreecommitdiff
path: root/src/qcam/viewfinder_gl.cpp
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-10-12 19:59:42 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-11-07 19:25:24 +0200
commit99f72137e5f7f44298346415167dd603f44b9ca2 (patch)
treed1e7ad32df87b15fde4138b0073cea554913ce9e /src/qcam/viewfinder_gl.cpp
parent3b9a582f95981a1858ae13cbbc7a4adba652e91c (diff)
qcam: viewfinder_gl: Remove unneeded casts
There's no need to cast the yuvData_ unsigned char pointer to a char pointer before performing pointer arithmetics. Drop the unneeded casts. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Andrey Konovalov <andrey.konovalov@linaro.org> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'src/qcam/viewfinder_gl.cpp')
-rw-r--r--src/qcam/viewfinder_gl.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/qcam/viewfinder_gl.cpp b/src/qcam/viewfinder_gl.cpp
index c0729252..dc35d4fd 100644
--- a/src/qcam/viewfinder_gl.cpp
+++ b/src/qcam/viewfinder_gl.cpp
@@ -360,7 +360,7 @@ void ViewFinderGL::doRender()
0,
GL_RG,
GL_UNSIGNED_BYTE,
- (char *)yuvData_ + size_.width() * size_.height());
+ yuvData_ + size_.width() * size_.height());
shaderProgram_.setUniformValue(textureUniformU_, 1);
break;
@@ -390,7 +390,7 @@ void ViewFinderGL::doRender()
0,
GL_RED,
GL_UNSIGNED_BYTE,
- (char *)yuvData_ + size_.width() * size_.height());
+ yuvData_ + size_.width() * size_.height());
shaderProgram_.setUniformValue(textureUniformU_, 1);
/* Activate texture V */
@@ -404,7 +404,7 @@ void ViewFinderGL::doRender()
0,
GL_RED,
GL_UNSIGNED_BYTE,
- (char *)yuvData_ + size_.width() * size_.height() * 5 / 4);
+ yuvData_ + size_.width() * size_.height() * 5 / 4);
shaderProgram_.setUniformValue(textureUniformV_, 2);
break;
@@ -434,7 +434,7 @@ void ViewFinderGL::doRender()
0,
GL_RED,
GL_UNSIGNED_BYTE,
- (char *)yuvData_ + size_.width() * size_.height());
+ yuvData_ + size_.width() * size_.height());
shaderProgram_.setUniformValue(textureUniformV_, 2);
/* Activate texture U */
@@ -448,7 +448,7 @@ void ViewFinderGL::doRender()
0,
GL_RED,
GL_UNSIGNED_BYTE,
- (char *)yuvData_ + size_.width() * size_.height() * 5 / 4);
+ yuvData_ + size_.width() * size_.height() * 5 / 4);
shaderProgram_.setUniformValue(textureUniformU_, 1);
break;