Replace reinterpret_cast with safer or no cast
When casting types to one another in C++, the weaker the cast,
the better.
This change replaces instances of reinterpret_cast with static_cast
or no cast where it safe and correct to do so.
BUG=angleproject:2683
Change-Id: I99c9033614a65282ae1d78cf0f4b80fabd75877a
Reviewed-on: https://chromium-review.googlesource.com/1109396
Commit-Queue: Rafael Cintron <rafael.cintron@microsoft.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/renderer/vulkan/FramebufferVk.cpp b/src/libANGLE/renderer/vulkan/FramebufferVk.cpp
index c22b2f9..a86da49 100644
--- a/src/libANGLE/renderer/vulkan/FramebufferVk.cpp
+++ b/src/libANGLE/renderer/vulkan/FramebufferVk.cpp
@@ -315,7 +315,7 @@
params.pack = glState.getPackState();
ANGLE_TRY(readPixelsImpl(context, clippedArea, params,
- reinterpret_cast<uint8_t *>(pixels) + outputSkipBytes));
+ static_cast<uint8_t *>(pixels) + outputSkipBytes));
mReadPixelsBuffer.releaseRetainedBuffers(renderer);
return gl::NoError();
}
@@ -836,7 +836,7 @@
ANGLE_TRY(mReadPixelsBuffer.invalidate(renderer->getDevice()));
PackPixels(packPixelsParams, angleFormat, area.width * angleFormat.pixelBytes, readPixelBuffer,
- reinterpret_cast<uint8_t *>(pixels));
+ static_cast<uint8_t *>(pixels));
return vk::NoError();
}