Commit 89853e84 by Jamie Madill Committed by Commit Bot

Clean up unused variable macros.

We might want UNUSED_ASSERTION as a special case but the unused trace variable macro was being abused in places. BUG=angleproject:1290 Change-Id: I5f9252b3ff0484d2e859b9fcf68d5d060b28f1fc Reviewed-on: https://chromium-review.googlesource.com/324290Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Tested-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent eaaeb7fb
......@@ -55,7 +55,7 @@ TEST_F(BitSetIteratorTest, EmptySet)
for (unsigned long bit : IterateBitSet(mStateBits))
{
sawBit = true;
UNUSED_TRACE_VARIABLE(bit);
UNUSED_VARIABLE(bit);
}
EXPECT_FALSE(sawBit);
}
......
......@@ -53,7 +53,7 @@ void output(bool traceInDebugOnly, MessageType messageType, DebugTraceOutputType
}
std::string formattedMessage;
UNUSED_TRACE_VARIABLE(formattedMessage);
UNUSED_VARIABLE(formattedMessage);
#if !defined(NDEBUG) && defined(_MSC_VER)
if (messageType == MESSAGE_ERR)
......
......@@ -114,11 +114,7 @@ bool DebugAnnotationsActive();
#define UNUSED_ASSERTION_VARIABLE(variable) ((void)variable)
#endif
#ifndef ANGLE_ENABLE_DEBUG_TRACE
#define UNUSED_TRACE_VARIABLE(variable) ((void)variable)
#else
#define UNUSED_TRACE_VARIABLE(variable)
#endif
#define UNUSED_VARIABLE(variable) ((void)variable)
// A macro to indicate unimplemented functionality
......
......@@ -805,10 +805,8 @@ EGLint SwapChain11::present(EGLint x, EGLint y, EGLint width, EGLint height)
if (result == DXGI_ERROR_DEVICE_REMOVED)
{
ID3D11Device *device = mRenderer->getDevice();
HRESULT removedReason = device->GetDeviceRemovedReason();
UNUSED_TRACE_VARIABLE(removedReason);
ERR("Present failed: the D3D11 device was removed: 0x%08X", removedReason);
ERR("Present failed: the D3D11 device was removed: 0x%08X",
mRenderer->getDevice()->GetDeviceRemovedReason());
return EGL_CONTEXT_LOST;
}
else if (result == DXGI_ERROR_DEVICE_RESET)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment