Browse Source

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
master
Riyyi 3 years ago
parent
commit
29620c141e
  1. 6
      inferno/src/inferno/render/renderer.h
  2. 4
      inferno/src/inferno/window.h

6
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
};

4
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;
};

Loading…
Cancel
Save