fix linux compile error

This commit is contained in:
Arnold 2019-03-18 14:54:35 +08:00
parent 811b66b51e
commit 98fa7af850
No known key found for this signature in database
GPG Key ID: 8E1941DE15A3E59A
2 changed files with 6 additions and 2 deletions

View File

@ -3,6 +3,9 @@
#include "renderer/backend/Program.h"
#include "renderer/backend/Texture.h"
#include "renderer/backend/Types.h"
#include <algorithm>
#ifdef CC_USE_METAL
#include "glsl_optimizer.h"
#endif
@ -437,8 +440,8 @@ ProgramState::AutoBindingResolver::AutoBindingResolver()
ProgramState::AutoBindingResolver::~AutoBindingResolver()
{
auto it = std::find(std::begin(_customAutoBindingResolvers), std::end(_customAutoBindingResolvers), this);
if (it != std::end(_customAutoBindingResolvers)) _customAutoBindingResolvers.erase(it);
auto &list = _customAutoBindingResolvers;
list.erase(std::remove(list.begin(), list.end(), this), list.end());
}
CC_BACKEND_END

View File

@ -4,6 +4,7 @@
#include <string>
#include <unordered_map>
#include <cstdint>
#include <functional>
#include "platform/CCPlatformMacros.h"
#include "base/CCRef.h"
#include "renderer/backend/Types.h"