Replace ordered_map with unordered_map when ordering is not required

This commit is contained in:
SirLynix 2023-04-09 20:53:34 +02:00 committed by Jérôme Leclercq
parent 4f1f0c6418
commit 6a609055dc
3 changed files with 5 additions and 5 deletions

View File

@ -11,7 +11,6 @@
#include <Nazara/Utility/StaticMesh.hpp>
#include <Nazara/Utility/VertexBuffer.hpp>
#include <NazaraUtils/MemoryHelper.hpp>
#include <tsl/ordered_map.h>
#include <BulletCollision/CollisionShapes/btBoxShape.h>
#include <BulletCollision/CollisionShapes/btCapsuleShape.h>
#include <BulletCollision/CollisionShapes/btCompoundShape.h>
@ -21,6 +20,7 @@
#include <BulletCollision/CollisionShapes/btEmptyShape.h>
#include <BulletCollision/CollisionShapes/btSphereShape.h>
#include <BulletCollision/CollisionShapes/btStaticPlaneShape.h>
#include <unordered_map>
#include <Nazara/BulletPhysics3D/Debug.hpp>
namespace Nz
@ -299,7 +299,7 @@ namespace Nz
void BulletConvexCollider3D::BuildDebugMesh(std::vector<Vector3f>& vertices, std::vector<UInt16>& indices, const Matrix4f& offsetMatrix) const
{
tsl::ordered_map<Vector3f, UInt16> vertexCache;
std::unordered_map<Vector3f, UInt16> vertexCache;
auto InsertVertex = [&](const Vector3f& position) -> UInt16
{
auto it = vertexCache.find(position);

View File

@ -11,7 +11,6 @@
#include <Nazara/Utility/StaticMesh.hpp>
#include <Nazara/Utility/VertexBuffer.hpp>
#include <NazaraUtils/StackArray.hpp>
#include <tsl/ordered_map.h>
#include <Jolt/Core/Core.h>
#include <Jolt/Physics/Collision/Shape/BoxShape.h>
#include <Jolt/Physics/Collision/Shape/CapsuleShape.h>
@ -19,6 +18,7 @@
#include <Jolt/Physics/Collision/Shape/RotatedTranslatedShape.h>
#include <Jolt/Physics/Collision/Shape/StaticCompoundShape.h>
#include <Jolt/Physics/Collision/Shape/SphereShape.h>
#include <unordered_map>
#include <Nazara/JoltPhysics3D/Debug.hpp>
namespace Nz
@ -302,7 +302,7 @@ namespace Nz
void JoltConvexHullCollider3D::BuildDebugMesh(std::vector<Vector3f>& vertices, std::vector<UInt16>& indices, const Matrix4f& offsetMatrix) const
{
tsl::ordered_map<Vector3f, UInt16> vertexCache;
std::unordered_map<Vector3f, UInt16> vertexCache;
auto InsertVertex = [&](const Vector3f& position) -> UInt16
{
auto it = vertexCache.find(position);

View File

@ -68,7 +68,7 @@ local modules = {
},
BulletPhysics3D = {
Deps = {"NazaraUtility"},
Packages = { "bullet3", "entt", "ordered_map" }
Packages = { "bullet3", "entt" }
},
Core = {
Custom = function ()