Commit 16f99b74 by Jamie Madill

Fix warnings with code analysis tools.

Variable shadowing and a few other non-bug warnings. BUG=None Change-Id: Ibf62d6e7fef91fc213a53a6902f494147ed30ebc Reviewed-on: https://chromium-review.googlesource.com/283223Tested-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent 56eee79f
......@@ -171,9 +171,9 @@ gl::Error VertexDataManager::prepareVertexData(const gl::State &state,
}
// Reserve the required space in the buffers
for (const TranslatedAttribute *translated : mActiveEnabledAttributes)
for (const TranslatedAttribute *activeAttrib : mActiveEnabledAttributes)
{
gl::Error error = reserveSpaceForAttrib(*translated, count, instances);
gl::Error error = reserveSpaceForAttrib(*activeAttrib, count, instances);
if (error.isError())
{
return error;
......@@ -181,9 +181,9 @@ gl::Error VertexDataManager::prepareVertexData(const gl::State &state,
}
// Perform the vertex data translations
for (TranslatedAttribute *translated : mActiveEnabledAttributes)
for (TranslatedAttribute *activeAttrib : mActiveEnabledAttributes)
{
gl::Error error = storeAttribute(translated, start, count, instances);
gl::Error error = storeAttribute(activeAttrib, start, count, instances);
if (error.isError())
{
......@@ -212,14 +212,14 @@ gl::Error VertexDataManager::prepareVertexData(const gl::State &state,
// Hint to unmap all the resources
hintUnmapAllResources(vertexAttributes);
for (const TranslatedAttribute *translated : mActiveEnabledAttributes)
for (const TranslatedAttribute *activeAttrib : mActiveEnabledAttributes)
{
gl::Buffer *buffer = translated->attribute->buffer.get();
gl::Buffer *buffer = activeAttrib->attribute->buffer.get();
if (buffer)
{
BufferD3D *bufferD3D = GetImplAs<BufferD3D>(buffer);
size_t typeSize = ComputeVertexAttributeTypeSize(*translated->attribute);
size_t typeSize = ComputeVertexAttributeTypeSize(*activeAttrib->attribute);
bufferD3D->promoteStaticUsage(count * typeSize);
}
}
......
......@@ -66,7 +66,10 @@ HRESULT NativeWindow::createSwapChain(ID3D11Device* device, DXGIFactory* factory
swapChainDesc.Flags = 0;
IDXGISwapChain1 *swapChain1 = nullptr;
HRESULT result = factory2->CreateSwapChainForHwnd(device, mWindow, &swapChainDesc, nullptr, nullptr, &swapChain1);
*swapChain = static_cast<DXGISwapChain*>(swapChain1);
if (SUCCEEDED(result))
{
*swapChain = static_cast<DXGISwapChain*>(swapChain1);
}
SafeRelease(factory2);
return result;
}
......
......@@ -135,7 +135,7 @@ gl::Error Blit9::setShader(ShaderId source, const char *profile,
{
IDirect3DDevice9 *device = mRenderer->getDevice();
D3DShaderType *shader;
D3DShaderType *shader = nullptr;
if (mCompiledShaders[source] != NULL)
{
......
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