From 29620c141ec460e67ac2885aafd4eaa653617866 Mon Sep 17 00:00:00 2001 From: Riyyi Date: Wed, 13 Jan 2021 12:02:12 +0100 Subject: [PATCH] Convert copy-list-initialization to direct-list-initialization Good place to see the different types of initialization: https://en.cppreference.com/w/cpp/language/explicit --- inferno/src/inferno/render/renderer.h | 6 +++--- inferno/src/inferno/window.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/inferno/src/inferno/render/renderer.h b/inferno/src/inferno/render/renderer.h index a07abac..a376358 100644 --- a/inferno/src/inferno/render/renderer.h +++ b/inferno/src/inferno/render/renderer.h @@ -18,9 +18,9 @@ namespace Inferno { class VertexArray; struct QuadVertex { - glm::vec3 position = { 0.0f, 0.0f, 0.0f }; - glm::vec4 color = { 1.0f, 1.0f, 1.0f, 1.0f }; - glm::vec2 textureCoordinates = { 0.0f, 0.0f }; + glm::vec3 position { 0.0f, 0.0f, 0.0f }; + glm::vec4 color { 1.0f, 1.0f, 1.0f, 1.0f }; + glm::vec2 textureCoordinates { 0.0f, 0.0f }; float textureIndex = 0; // @Todo get int to pass to fragment correctly }; diff --git a/inferno/src/inferno/window.h b/inferno/src/inferno/window.h index e8e064e..84ed713 100644 --- a/inferno/src/inferno/window.h +++ b/inferno/src/inferno/window.h @@ -13,10 +13,10 @@ namespace Inferno { class Event; struct WindowProperties { - std::string title = "Inferno"; + std::string title { "Inferno" }; int width = 1280; int height = 720; - std::string fullscreen = "windowed"; // windowed/fullscreen/borderless + std::string fullscreen { "windowed" }; // windowed/fullscreen/borderless bool vsync = true; };