Skip to content

Commit 3778490

Browse files
upgrades
1 parent 990a85c commit 3778490

12 files changed

Lines changed: 42 additions & 59 deletions

File tree

Obelisk/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ target_include_directories (${TARGET_NAME}
3333
${ENLISTMENT_ROOT}/ZEngine
3434
)
3535

36-
target_precompile_headers(${TARGET_NAME} PRIVATE pch.h)
37-
3836
target_compile_definitions(${TARGET_NAME}
3937
PRIVATE
4038
NOMINMAX

Obelisk/pch.h

Lines changed: 0 additions & 18 deletions
This file was deleted.

Tetragrama/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ target_include_directories (${TARGET_NAME}
4242
./Managers
4343
)
4444

45-
target_precompile_headers(${TARGET_NAME} PRIVATE pch.h)
46-
4745
target_compile_definitions(${TARGET_NAME}
4846
PRIVATE
4947
NOMINMAX

Tetragrama/pch.h

Lines changed: 0 additions & 18 deletions
This file was deleted.

ZEngine/ZEngine/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ target_include_directories (zEngineLib
5151
./Serializers
5252
)
5353

54-
target_precompile_headers(zEngineLib PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/pch.h)
55-
5654
if(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
5755
target_compile_definitions (zEngineLib PUBLIC ENABLE_VULKAN_VALIDATION_LAYER)
5856
endif()

ZEngine/ZEngine/Core/Maths/Matrix.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -494,10 +494,12 @@ namespace ZEngine::Core::Maths
494494
translation = Vec3f(LocalMatrix[3].x, LocalMatrix[3].y, LocalMatrix[3].z);
495495
LocalMatrix[3] = Vec4f(0, 0, 0, LocalMatrix[3].w);
496496

497-
Vec3f Row[3], Pdum3;
498-
for (int i = 0; i < 3; ++i)
499-
for (int j = 0; j < 3; ++j)
497+
std::array<Vec3f, 3> Row{};
498+
for (int i = 0; i < 3; ++i) {
499+
for (int j = 0; j < 3; ++j) {
500500
Row[i][j] = LocalMatrix(i, j);
501+
}
502+
}
501503

502504
scale.x = Row[0].magnitude();
503505
Row[0] = Row[0].normalize();
@@ -588,4 +590,4 @@ namespace ZEngine::Core::Maths
588590
return &vec.x;
589591
}
590592

591-
} // namespace ZEngine::Core::Maths
593+
} // namespace ZEngine::Core::Maths

ZEngine/ZEngine/Hardwares/DeviceSwapchain.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ namespace ZEngine::Hardwares
121121
Array<VkImage> swapchain_images = {};
122122
swapchain_images.init(scratch.Arena, SwapchainImageCount, SwapchainImageCount);
123123
ZENGINE_VALIDATE_ASSERT(vkGetSwapchainImagesKHR(Device->LogicalDevice, SwapchainHandle, &SwapchainImageCount, swapchain_images.data()) == VK_SUCCESS, "Failed to get VkImages from Swapchain")
124-
for (int i = 0; i < SwapchainImageCount; ++i)
124+
for (auto i = 0U; i < SwapchainImageCount; ++i)
125125
{
126126
SwapchainImageViews[i] = Device->CreateImageView(swapchain_images[i], Device->SurfaceFormat.format, VK_IMAGE_VIEW_TYPE_2D, VK_IMAGE_ASPECT_COLOR_BIT);
127127

ZEngine/ZEngine/Hardwares/VulkanDevice.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ namespace ZEngine::Hardwares
100100
VkSampler Sampler{VK_NULL_HANDLE};
101101
VmaAllocation Allocation{nullptr};
102102
// clang-format off
103-
operator bool() const
103+
explicit operator bool() const
104104
{
105105
return (Handle != VK_NULL_HANDLE);
106106
}
@@ -291,8 +291,8 @@ namespace ZEngine::Hardwares
291291

292292
explicit UniformBuffer(const UniformBuffer& rhs) = delete;
293293

294-
explicit UniformBuffer(UniformBuffer& rhs)
295-
{
294+
UniformBuffer(UniformBuffer& rhs)
295+
: IGraphicBuffer(rhs) {
296296
this->m_device = rhs.m_device;
297297
this->m_total_size = rhs.m_total_size;
298298

ZEngine/ZEngine/Helpers/HandleManager.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ namespace ZEngine::Helpers
1818
struct Handle
1919
{
2020
uint64_t Index = UINT64_MAX;
21-
uint64_t Generation = 0u;
21+
uint64_t Generation = 0U;
2222

23-
bool Valid() const
23+
[[nodiscard]] bool Valid() const
2424
{
2525
return Index != UINT64_MAX;
2626
}
2727

28-
operator bool() const
28+
explicit operator bool() const
2929
{
3030
return Valid();
3131
}
@@ -36,7 +36,7 @@ namespace ZEngine::Helpers
3636
{
3737
union FreeHead
3838
{
39-
struct
39+
struct storage
4040
{
4141
uint32_t index;
4242
uint32_t tag;

ZEngine/ZEngine/Logging/Logger.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <spdlog/async_logger.h>
99
#include <spdlog/details/thread_pool.h>
1010
#include <spdlog/sinks/rotating_file_sink.h>
11+
#include <filesystem>
1112

1213
using namespace ZEngine::Core::Memory;
1314

0 commit comments

Comments
 (0)