From 6839736b8283a59eb743e1f6058c7d266a3e7f36 Mon Sep 17 00:00:00 2001 From: rtk0c Date: Tue, 28 Jun 2022 12:17:48 -0700 Subject: Changeset: 78 Replace "class" keyword in templates with "typename" --- source/30-game/CommonVertexIndex.cpp | 14 +++++++------- source/30-game/EditorUtils.hpp | 2 +- source/30-game/Material.cpp | 2 +- source/30-game/World.cpp | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) (limited to 'source/30-game') diff --git a/source/30-game/CommonVertexIndex.cpp b/source/30-game/CommonVertexIndex.cpp index 786274e..e9a3ce6 100644 --- a/source/30-game/CommonVertexIndex.cpp +++ b/source/30-game/CommonVertexIndex.cpp @@ -1,6 +1,6 @@ #include "CommonVertexIndex.hpp" -template +template static void AssignIndices(TNumber indices[6], TNumber startIdx) { // Triangle #1 indices[0] = startIdx + 1; // Top right @@ -12,7 +12,7 @@ static void AssignIndices(TNumber indices[6], TNumber startIdx) { indices[5] = startIdx + 2; // Bottom right } -template +template static void AssignIndices(TNumber indices[6], TNumber topLeft, TNumber topRight, TNumber bottomRight, TNumber bottomLeft) { // Triangle #1 indices[0] = topRight; @@ -24,7 +24,7 @@ static void AssignIndices(TNumber indices[6], TNumber topLeft, TNumber topRight, indices[5] = bottomRight; } -template +template static void AssignPositions(TVertex vertices[4], const Rect& rect) { // Top left vertices[0].x = rect.x0(); @@ -40,7 +40,7 @@ static void AssignPositions(TVertex vertices[4], const Rect& rect) { vertices[3].y = rect.y1(); } -template +template static void AssignPositions(TVertex vertices[4], glm::vec2 bl, glm::vec2 tr) { // Top left vertices[0].x = bl.x; @@ -56,7 +56,7 @@ static void AssignPositions(TVertex vertices[4], glm::vec2 bl, glm::vec2 tr) { vertices[3].y = bl.y; } -template +template static void AssignDepths(TVertex vertices[4], float z) { for (int i = 0; i < 4; ++i) { auto& vert = vertices[i]; @@ -64,7 +64,7 @@ static void AssignDepths(TVertex vertices[4], float z) { } } -template +template static void AssignTexCoords(TVertex vertices[4], const Subregion& texcoords) { // Top left vertices[0].u = texcoords.u0; @@ -80,7 +80,7 @@ static void AssignTexCoords(TVertex vertices[4], const Subregion& texcoords) { vertices[3].v = texcoords.v0; } -template +template static void AssignColors(TVertex vertices[4], RgbaColor color) { for (int i = 0; i < 4; ++i) { auto& vert = vertices[i]; diff --git a/source/30-game/EditorUtils.hpp b/source/30-game/EditorUtils.hpp index 9d15f61..96e92d3 100644 --- a/source/30-game/EditorUtils.hpp +++ b/source/30-game/EditorUtils.hpp @@ -65,7 +65,7 @@ float CalcImageWidth(glm::vec2 original, float targetHeight); ImVec2 FitImage(glm::vec2 original); // TODO get kind from T -template +template T* SimpleIresReceptor(T* existing, IEditor& editor, IresObject::Kind kind) { if (existing) { existing->ShowReference(editor); diff --git a/source/30-game/Material.cpp b/source/30-game/Material.cpp index 9b0c42d..4443ae5 100644 --- a/source/30-game/Material.cpp +++ b/source/30-game/Material.cpp @@ -33,7 +33,7 @@ bool TryFindShaderId(Shader* shader, std::string_view name, int& out) { return true; } -template +template TUniform& ObtainUniform(Shader* shader, const char* name, std::vector& uniforms, GLint location) { for (auto& uniform : uniforms) { if (uniform.location == location) { diff --git a/source/30-game/World.cpp b/source/30-game/World.cpp index d4a8344..5d3a8c5 100644 --- a/source/30-game/World.cpp +++ b/source/30-game/World.cpp @@ -6,7 +6,7 @@ #include namespace ProjectBrussel_UNITY_ID { -template +template void CallGameObjectRecursive(GameObject* start, TFunction&& func) { PodVector stack; stack.push_back(start); -- cgit v1.2.3-70-g09d2