Scope ANGLE_UNUSED_VARIABLE.
Renames the macro to be more ANGLE-ey.
Refactoring only.
Bug: angleproject:1671
Change-Id: I8f2dd227c7e2025886ec66e85efa877ea261d0ad
Reviewed-on: https://chromium-review.googlesource.com/1036209
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
diff --git a/src/common/bitset_utils_unittest.cpp b/src/common/bitset_utils_unittest.cpp
index 3394890..fc2c752 100644
--- a/src/common/bitset_utils_unittest.cpp
+++ b/src/common/bitset_utils_unittest.cpp
@@ -55,7 +55,7 @@
for (size_t bit : mStateBits)
{
sawBit = true;
- UNUSED_VARIABLE(bit);
+ ANGLE_UNUSED_VARIABLE(bit);
}
EXPECT_FALSE(sawBit);
}
diff --git a/src/common/debug.h b/src/common/debug.h
index dbbdd7c..70d93ae 100644
--- a/src/common/debug.h
+++ b/src/common/debug.h
@@ -259,7 +259,7 @@
#define UNREACHABLE_IS_NORETURN 0
#endif // defined(ANGLE_ENABLE_ASSERTS)
-#define UNUSED_VARIABLE(variable) ((void)variable)
+#define ANGLE_UNUSED_VARIABLE(variable) (static_cast<void>(variable))
// A macro to indicate unimplemented functionality
#ifndef NOASSERT_UNIMPLEMENTED
diff --git a/src/libANGLE/Context.cpp b/src/libANGLE/Context.cpp
index 132271c..4de0868 100644
--- a/src/libANGLE/Context.cpp
+++ b/src/libANGLE/Context.cpp
@@ -297,8 +297,8 @@
mZeroFilledBuffer(1000u)
{
// Needed to solve a Clang warning of unused variables.
- UNUSED_VARIABLE(mSavedArgsType);
- UNUSED_VARIABLE(mParamsBuffer);
+ ANGLE_UNUSED_VARIABLE(mSavedArgsType);
+ ANGLE_UNUSED_VARIABLE(mParamsBuffer);
mImplementation->setMemoryProgramCache(memoryProgramCache);
diff --git a/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp b/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
index 3ee152b..4790059 100644
--- a/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
+++ b/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
@@ -1259,7 +1259,7 @@
const egl::AttributeMap &attribs) const
{
#ifdef ANGLE_ENABLE_WINDOWS_STORE
- UNUSED_VARIABLE(attribs);
+ ANGLE_UNUSED_VARIABLE(attribs);
return new NativeWindow11WinRT(window, config->alphaSize > 0);
#else
return new NativeWindow11Win32(
diff --git a/src/libANGLE/renderer/vulkan/SurfaceVk.cpp b/src/libANGLE/renderer/vulkan/SurfaceVk.cpp
index c6c53b5..2c6bdde 100644
--- a/src/libANGLE/renderer/vulkan/SurfaceVk.cpp
+++ b/src/libANGLE/renderer/vulkan/SurfaceVk.cpp
@@ -239,7 +239,7 @@
uint32_t presentQueue = 0;
ANGLE_TRY_RESULT(renderer->selectPresentQueueForSurface(mSurface), presentQueue);
- UNUSED_VARIABLE(presentQueue);
+ ANGLE_UNUSED_VARIABLE(presentQueue);
const VkPhysicalDevice &physicalDevice = renderer->getPhysicalDevice();
diff --git a/src/libANGLE/renderer/vulkan/vk_cache_utils.cpp b/src/libANGLE/renderer/vulkan/vk_cache_utils.cpp
index 3e21a03..2f5d14f 100644
--- a/src/libANGLE/renderer/vulkan/vk_cache_utils.cpp
+++ b/src/libANGLE/renderer/vulkan/vk_cache_utils.cpp
@@ -246,7 +246,7 @@
// RenderPassDesc implementation.
RenderPassDesc::RenderPassDesc()
{
- UNUSED_VARIABLE(mPadding);
+ ANGLE_UNUSED_VARIABLE(mPadding);
memset(this, 0, sizeof(RenderPassDesc));
}
diff --git a/src/tests/perf_tests/BitSetIteratorPerf.cpp b/src/tests/perf_tests/BitSetIteratorPerf.cpp
index b19be85..f493396 100644
--- a/src/tests/perf_tests/BitSetIteratorPerf.cpp
+++ b/src/tests/perf_tests/BitSetIteratorPerf.cpp
@@ -42,7 +42,7 @@
for (size_t bit : mBits)
{
- UNUSED_VARIABLE(bit);
+ ANGLE_UNUSED_VARIABLE(bit);
}
mBits.reset();