From 4d6caeb191ebb13617c48fc95f362677eaed30d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Fonseca?= Date: Wed, 27 Sep 2023 11:42:25 +0100 Subject: [PATCH] test --- core/include/cubos/core/memory/buffer_stream.hpp | 2 +- core/include/cubos/core/memory/endianness.hpp | 2 -- core/src/cubos/core/memory/buffer_stream.cpp | 2 -- core/tests/ecs/dispatcher.cpp | 2 -- engine/src/cubos/engine/collisions/broad_phase.hpp | 2 -- 5 files changed, 1 insertion(+), 9 deletions(-) diff --git a/core/include/cubos/core/memory/buffer_stream.hpp b/core/include/cubos/core/memory/buffer_stream.hpp index 7f5cb5df71..9343725b7f 100644 --- a/core/include/cubos/core/memory/buffer_stream.hpp +++ b/core/include/cubos/core/memory/buffer_stream.hpp @@ -19,7 +19,7 @@ namespace cubos::core::memory /// @param buffer Buffer to read/write from. /// @param size Size of the buffer. /// @param readOnly Whether the buffer is read-only. - BufferStream(void* buffer, std::size_t size, bool readOnly = false); + BufferStream(void* boffer, std::size_t size, bool readOnly = false); /// @brief Constructs using a read-only buffer. /// @param buffer Buffer to read/write from. diff --git a/core/include/cubos/core/memory/endianness.hpp b/core/include/cubos/core/memory/endianness.hpp index 9e068b0862..56030de9b1 100644 --- a/core/include/cubos/core/memory/endianness.hpp +++ b/core/include/cubos/core/memory/endianness.hpp @@ -63,9 +63,7 @@ namespace cubos::core::memory src.value = value; for (std::size_t i = 0; i < sizeof(T); i++) - { dst.bytes[i] = src.bytes[sizeof(T) - i - 1]; - } return dst.value; } diff --git a/core/src/cubos/core/memory/buffer_stream.cpp b/core/src/cubos/core/memory/buffer_stream.cpp index fac08c8bb5..9585946254 100644 --- a/core/src/cubos/core/memory/buffer_stream.cpp +++ b/core/src/cubos/core/memory/buffer_stream.cpp @@ -44,9 +44,7 @@ BufferStream::BufferStream(std::size_t size) BufferStream::~BufferStream() { if (mOwned) - { delete[] static_cast(mBuffer); - } } BufferStream::BufferStream(const BufferStream& other) diff --git a/core/tests/ecs/dispatcher.cpp b/core/tests/ecs/dispatcher.cpp index c3aabab630..d30b2226f9 100644 --- a/core/tests/ecs/dispatcher.cpp +++ b/core/tests/ecs/dispatcher.cpp @@ -45,9 +45,7 @@ static void assertOrder(World& world, std::vector values) auto order = world.read>(); REQUIRE(order.get().size() == values.size()); for (std::size_t i = 0; i < values.size(); ++i) - { CHECK(order.get()[i] == values[i]); - } } /// Compiles the dispatcher chain and calls the systems. diff --git a/engine/src/cubos/engine/collisions/broad_phase.hpp b/engine/src/cubos/engine/collisions/broad_phase.hpp index 45bc6c5097..8d58759e60 100644 --- a/engine/src/cubos/engine/collisions/broad_phase.hpp +++ b/engine/src/cubos/engine/collisions/broad_phase.hpp @@ -35,13 +35,11 @@ void trackNewEntities(Query, OptRead> query, Write, Without> for (auto [entity, collider, aabb] : query) - { if (!aabb) { commands.add(entity, ColliderAABB{}); collisions->addEntity(entity); } - } } /// @brief Updates the AABBs of all box colliders.