Fix compilation with GCC/Clang

Thanks to @Gawaboumga


Former-commit-id: c2ecad3d8c0bad06cb47b906829585c8d0b910c0 [formerly 7790b792e730ed65c3e8b8dddbd91b1527631e2e] [formerly ae62fe532d14dd33bfc88cf7bca1d19e63487a3f [formerly 41b273ee595cc56c6145651fb4caa1ceca0b2bf6]]
Former-commit-id: 7d4c3b3d0b48235a6c3534154c5787738440b2ae [formerly 96dcb709ba81c5696ba633b06e887007d5d9caf5]
Former-commit-id: 2a2013af6d26bb64362d1edd2e6aacaac000708f
This commit is contained in:
Lynix
2016-08-10 22:17:55 +02:00
parent 6129689573
commit 5ebff77ef0
5 changed files with 10 additions and 6 deletions

View File

@@ -49,8 +49,8 @@ namespace Nz
*/
MaterialPipelineRef MaterialPipeline::GetPipeline(const MaterialPipelineInfo& pipelineInfo)
{
auto it = s_pipelineCache.lower_bound(pipelineInfo);
if (it == s_pipelineCache.end() || it->first != pipelineInfo)
auto it = s_pipelineCache.find(pipelineInfo);
if (it == s_pipelineCache.end())
it = s_pipelineCache.insert(it, PipelineCache::value_type(pipelineInfo, New(pipelineInfo)));
return it->second;