Remove a few VS2010 workarounds
VS2010 has problems with range-based for loops and with constructing a map item that contained uncopyable typesmaster
parent
f0bf74e422
commit
b6cc5516cc
|
@ -68,7 +68,7 @@ struct FutureShaderContainer
|
|||
unique_ptr<void, HandleCloser> thread;
|
||||
wstring fileName;
|
||||
};
|
||||
map<wstring, unique_ptr<FutureShaderContext>> contexts;
|
||||
map<wstring, FutureShaderContext> contexts;
|
||||
unique_ptr<void, MutexCloser> lock;
|
||||
FutureShaderContainer() : lock(OSCreateMutex()) {}
|
||||
};
|
||||
|
@ -136,9 +136,8 @@ FutureShader GraphicsSystem::CreatePixelShaderFromFileAsync(CTSTR fileName)
|
|||
MutexLock m(futureShaders->lock);
|
||||
|
||||
bool initialized = cs.find(fn) != end(cs);
|
||||
if (!initialized)
|
||||
cs[fn].reset(new FutureShaderContainer::FutureShaderContext);
|
||||
auto &c = *cs[fn];
|
||||
|
||||
auto &c = cs[fn];
|
||||
|
||||
if (!initialized)
|
||||
{
|
||||
|
|
|
@ -145,12 +145,12 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR pCmdLine,
|
|||
if(!init_res->using_custom_impl || !encoder)
|
||||
{
|
||||
init_res->using_custom_impl = false;
|
||||
decltype(begin(valid_impl)) best = nullptr;
|
||||
for(auto impl = begin(valid_impl); impl != std::end(valid_impl); impl++)
|
||||
decltype(&valid_impl[0]) best = nullptr;
|
||||
for(auto &impl : valid_impl)
|
||||
{
|
||||
auto result = encoder.InitializeMFX(*impl);
|
||||
auto result = encoder.InitializeMFX(impl);
|
||||
if(result == MFX_WRN_PARTIAL_ACCELERATION && !best)
|
||||
best = impl;
|
||||
best = &impl;
|
||||
if(result == MFX_ERR_NONE)
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -523,8 +523,8 @@ void SettingsPublish::OptimizeSettings()
|
|||
if (OBSMessageBox(hwnd, changes.Array(), nullptr, MB_OKCANCEL) != IDOK)
|
||||
return;
|
||||
|
||||
for (optimizers_t::iterator i = begin(optimizers); i != end(optimizers); i++)
|
||||
(*i)();
|
||||
for (optimizers_t::const_reference i : optimizers)
|
||||
i();
|
||||
}
|
||||
|
||||
INT_PTR SettingsPublish::ProcMessage(UINT message, WPARAM wParam, LPARAM lParam)
|
||||
|
|
Loading…
Reference in New Issue