diff --git a/src/Layers/xrRenderDX10/dx10ResourceManager_Resources.cpp b/src/Layers/xrRenderDX10/dx10ResourceManager_Resources.cpp index 221027a730d..553d92bb69b 100644 --- a/src/Layers/xrRenderDX10/dx10ResourceManager_Resources.cpp +++ b/src/Layers/xrRenderDX10/dx10ResourceManager_Resources.cpp @@ -268,9 +268,9 @@ SPS* CResourceManager::_CreatePS (LPCSTR _name) FS.update_path (cname, "$game_shaders$", cname); // duplicate and zero-terminate - IReader* R = FS.r_open(cname); + IReader *file = FS.r_open(cname); // TODO: DX10: HACK: Implement all shaders. Remove this for PS - if (!R) + if (!file) { string1024 tmp; // TODO: HACK: Test failure @@ -279,10 +279,8 @@ SPS* CResourceManager::_CreatePS (LPCSTR _name) Msg (tmp); strconcat (sizeof(cname), cname,GlobalEnv.Render->getShaderPath(),"stub_default",".ps"); FS.update_path (cname, "$game_shaders$", cname); - R = FS.r_open(cname); + file = FS.r_open(cname); } - - IReader* file = FS.r_open(cname); R_ASSERT2 ( file, cname ); u32 const size = file->length(); char* const data = (LPSTR)_alloca(size + 1); diff --git a/src/Layers/xrRenderPC_GL/glResourceManager_Resources.cpp b/src/Layers/xrRenderPC_GL/glResourceManager_Resources.cpp index ddc34ccd0f4..ff78384fa49 100644 --- a/src/Layers/xrRenderPC_GL/glResourceManager_Resources.cpp +++ b/src/Layers/xrRenderPC_GL/glResourceManager_Resources.cpp @@ -358,9 +358,9 @@ SGS* CResourceManager::_CreateGS (LPCSTR name) FS.update_path (cname, "$game_shaders$", cname); // duplicate and zero-terminate - IReader* R = FS.r_open(cname); + IReader *file = FS.r_open(cname); // TODO: DX10: HACK: Implement all shaders. Remove this for PS - if (!R) + if (!file) { string1024 tmp; // TODO: HACK: Test failure @@ -369,9 +369,8 @@ SGS* CResourceManager::_CreateGS (LPCSTR name) Msg (tmp); strconcat (sizeof(cname), cname,GlobalEnv.Render->getShaderPath(),"stub_default",".gs"); FS.update_path (cname, "$game_shaders$", cname); - R = FS.r_open(cname); + file = FS.r_open(cname); } - IReader* file = FS.r_open(cname); R_ASSERT2 ( file, cname ); // Select target