Commit 9b8f92ea by Geoff Lang

Remove uses of the HASH_MAP define since unordered_map is already used in several places.

TRAC #23618 Signed-off-by: Nicolas Capens Signed-off-by: Shannon Woods Author: Geoff Lang
parent ea228635
#define MAJOR_VERSION 2 #define MAJOR_VERSION 2
#define MINOR_VERSION 0 #define MINOR_VERSION 0
#define BUILD_VERSION 0 #define BUILD_VERSION 0
#define BUILD_REVISION 2001 #define BUILD_REVISION 2002
#define STRINGIFY(x) #x #define STRINGIFY(x) #x
#define MACRO_STRINGIFY(x) STRINGIFY(x) #define MACRO_STRINGIFY(x) STRINGIFY(x)
......
...@@ -22,11 +22,7 @@ ...@@ -22,11 +22,7 @@
#include <string> #include <string>
#include <map> #include <map>
#ifdef _MSC_VER
#include <hash_map>
#else
#include <unordered_map> #include <unordered_map>
#endif
#include "common/angleutils.h" #include "common/angleutils.h"
#include "common/RefCountObject.h" #include "common/RefCountObject.h"
...@@ -472,27 +468,19 @@ class Context ...@@ -472,27 +468,19 @@ class Context
BindingPointer<Texture3D> mTexture3DZero; BindingPointer<Texture3D> mTexture3DZero;
BindingPointer<Texture2DArray> mTexture2DArrayZero; BindingPointer<Texture2DArray> mTexture2DArrayZero;
#ifndef HASH_MAP typedef std::unordered_map<GLuint, Framebuffer*> FramebufferMap;
# ifdef _MSC_VER
# define HASH_MAP stdext::hash_map
# else
# define HASH_MAP std::unordered_map
# endif
#endif
typedef HASH_MAP<GLuint, Framebuffer*> FramebufferMap;
FramebufferMap mFramebufferMap; FramebufferMap mFramebufferMap;
HandleAllocator mFramebufferHandleAllocator; HandleAllocator mFramebufferHandleAllocator;
typedef HASH_MAP<GLuint, FenceNV*> FenceNVMap; typedef std::unordered_map<GLuint, FenceNV*> FenceNVMap;
FenceNVMap mFenceNVMap; FenceNVMap mFenceNVMap;
HandleAllocator mFenceNVHandleAllocator; HandleAllocator mFenceNVHandleAllocator;
typedef HASH_MAP<GLuint, Query*> QueryMap; typedef std::unordered_map<GLuint, Query*> QueryMap;
QueryMap mQueryMap; QueryMap mQueryMap;
HandleAllocator mQueryHandleAllocator; HandleAllocator mQueryHandleAllocator;
typedef HASH_MAP<GLuint, VertexArray*> VertexArrayMap; typedef std::unordered_map<GLuint, VertexArray*> VertexArrayMap;
VertexArrayMap mVertexArrayMap; VertexArrayMap mVertexArrayMap;
HandleAllocator mVertexArrayHandleAllocator; HandleAllocator mVertexArrayHandleAllocator;
......
...@@ -14,11 +14,7 @@ ...@@ -14,11 +14,7 @@
#include <GLES3/gl3.h> #include <GLES3/gl3.h>
#include <GLES2/gl2.h> #include <GLES2/gl2.h>
#ifdef _MSC_VER
#include <hash_map>
#else
#include <unordered_map> #include <unordered_map>
#endif
#include "common/angleutils.h" #include "common/angleutils.h"
#include "libGLESv2/angletypes.h" #include "libGLESv2/angletypes.h"
...@@ -87,37 +83,31 @@ class ResourceManager ...@@ -87,37 +83,31 @@ class ResourceManager
std::size_t mRefCount; std::size_t mRefCount;
rx::Renderer *mRenderer; rx::Renderer *mRenderer;
#ifndef HASH_MAP typedef std::unordered_map<GLuint, Buffer*> BufferMap;
# ifdef _MSC_VER
# define HASH_MAP stdext::hash_map
# else
# define HASH_MAP std::unordered_map
# endif
#endif
typedef HASH_MAP<GLuint, Buffer*> BufferMap;
BufferMap mBufferMap; BufferMap mBufferMap;
HandleAllocator mBufferHandleAllocator; HandleAllocator mBufferHandleAllocator;
typedef HASH_MAP<GLuint, Shader*> ShaderMap; typedef std::unordered_map<GLuint, Shader*> ShaderMap;
ShaderMap mShaderMap; ShaderMap mShaderMap;
typedef HASH_MAP<GLuint, Program*> ProgramMap; typedef std::unordered_map<GLuint, Program*> ProgramMap;
ProgramMap mProgramMap; ProgramMap mProgramMap;
HandleAllocator mProgramShaderHandleAllocator; HandleAllocator mProgramShaderHandleAllocator;
typedef HASH_MAP<GLuint, Texture*> TextureMap; typedef std::unordered_map<GLuint, Texture*> TextureMap;
TextureMap mTextureMap; TextureMap mTextureMap;
HandleAllocator mTextureHandleAllocator; HandleAllocator mTextureHandleAllocator;
typedef HASH_MAP<GLuint, Renderbuffer*> RenderbufferMap; typedef std::unordered_map<GLuint, Renderbuffer*> RenderbufferMap;
RenderbufferMap mRenderbufferMap; RenderbufferMap mRenderbufferMap;
HandleAllocator mRenderbufferHandleAllocator; HandleAllocator mRenderbufferHandleAllocator;
HASH_MAP<GLuint, Sampler*> mSamplerMap; typedef std::unordered_map<GLuint, Sampler*> SamplerMap;
SamplerMap mSamplerMap;
HandleAllocator mSamplerHandleAllocator; HandleAllocator mSamplerHandleAllocator;
HASH_MAP<GLuint, FenceSync*> mFenceSyncMap; typedef std::unordered_map<GLuint, FenceSync*> FenceMap;
FenceMap mFenceSyncMap;
HandleAllocator mFenceSyncHandleAllocator; HandleAllocator mFenceSyncHandleAllocator;
}; };
......
...@@ -41,7 +41,3 @@ ...@@ -41,7 +41,3 @@
#include <D3D11.h> #include <D3D11.h>
#include <dxgi.h> #include <dxgi.h>
#include <D3Dcompiler.h> #include <D3Dcompiler.h>
#ifdef _MSC_VER
#include <hash_map>
#endif
...@@ -88,15 +88,7 @@ class ShaderCache ...@@ -88,15 +88,7 @@ class ShaderCache
return mDevice->CreatePixelShader(function, shader); return mDevice->CreatePixelShader(function, shader);
} }
#ifndef HASH_MAP typedef std::unordered_map<std::string, ShaderObject*> Map;
# ifdef _MSC_VER
# define HASH_MAP stdext::hash_map
# else
# define HASH_MAP std::unordered_map
# endif
#endif
typedef HASH_MAP<std::string, ShaderObject*> Map;
Map mMap; Map mMap;
IDirect3DDevice9 *mDevice; IDirect3DDevice9 *mDevice;
......
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