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
This commit is contained in:
Riyyi
2021-01-13 12:02:12 +01:00
parent de477e8d38
commit 29620c141e
2 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -18,9 +18,9 @@ namespace Inferno {
class VertexArray; class VertexArray;
struct QuadVertex { struct QuadVertex {
glm::vec3 position = { 0.0f, 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::vec4 color { 1.0f, 1.0f, 1.0f, 1.0f };
glm::vec2 textureCoordinates = { 0.0f, 0.0f }; glm::vec2 textureCoordinates { 0.0f, 0.0f };
float textureIndex = 0; // @Todo get int to pass to fragment correctly float textureIndex = 0; // @Todo get int to pass to fragment correctly
}; };
+2 -2
View File
@@ -13,10 +13,10 @@ namespace Inferno {
class Event; class Event;
struct WindowProperties { struct WindowProperties {
std::string title = "Inferno"; std::string title { "Inferno" };
int width = 1280; int width = 1280;
int height = 720; int height = 720;
std::string fullscreen = "windowed"; // windowed/fullscreen/borderless std::string fullscreen { "windowed" }; // windowed/fullscreen/borderless
bool vsync = true; bool vsync = true;
}; };