diff options
author | rtk0c <[email protected]> | 2022-11-25 17:20:46 -0800 |
---|---|---|
committer | rtk0c <[email protected]> | 2022-11-25 17:20:46 -0800 |
commit | 8e61ebb687bd683755b217ab1f338e5a3f174c25 (patch) | |
tree | fbd0200d51a9edda7c9f02120fe6be373efe492f | |
parent | a0ddfdbcbc6336685362343518770f7bdefd10fe (diff) |
Changeset: 92 Remove unused code & fix warnings
-rw-r--r-- | source/30-game/Shader.cpp | 4 | ||||
-rw-r--r-- | source/30-game/World.cpp | 25 |
2 files changed, 19 insertions, 10 deletions
diff --git a/source/30-game/Shader.cpp b/source/30-game/Shader.cpp index 4a58635..dbfda0b 100644 --- a/source/30-game/Shader.cpp +++ b/source/30-game/Shader.cpp @@ -379,6 +379,8 @@ bool QueryMathInfo(GLenum type, GLenum& scalarType, int& width, int& height) { case GL_DOUBLE_MAT3x4: DoOutput(GL_DOUBLE, 3, 4); return true; case GL_DOUBLE_MAT4x2: DoOutput(GL_DOUBLE, 4, 2); return true; case GL_DOUBLE_MAT4x3: DoOutput(GL_DOUBLE, 4, 3); return true; + + default: break; } return false; @@ -425,6 +427,8 @@ bool QuerySamplerInfo(GLenum type) { case GL_UNSIGNED_INT_SAMPLER_BUFFER: case GL_UNSIGNED_INT_SAMPLER_2D_RECT: return true; + + default: break; } return false; diff --git a/source/30-game/World.cpp b/source/30-game/World.cpp index 5d3a8c5..83b9a10 100644 --- a/source/30-game/World.cpp +++ b/source/30-game/World.cpp @@ -22,11 +22,6 @@ void CallGameObjectRecursive(GameObject* start, TFunction&& func) { func(obj); } } - -struct DrawCall { - GLuint vao; - GLuint vbo; -}; } // namespace ProjectBrussel_UNITY_ID GameWorld::GameWorld() @@ -46,21 +41,31 @@ const GameObject& GameWorld::GetRoot() const { }; void GameWorld::Awaken() { - if (mAwakened) return; + using namespace ProjectBrussel_UNITY_ID; + + if (mAwakened) { + return; + } - ProjectBrussel_UNITY_ID::CallGameObjectRecursive(mRoot, [](GameObject* obj) { obj->Awaken(); }); + CallGameObjectRecursive(mRoot, [](GameObject* obj) { obj->Awaken(); }); mAwakened = true; } void GameWorld::Resleep() { - if (!mAwakened) return; + using namespace ProjectBrussel_UNITY_ID; + + if (!mAwakened) { + return; + } - ProjectBrussel_UNITY_ID::CallGameObjectRecursive(mRoot, [](GameObject* obj) { obj->Resleep(); }); + CallGameObjectRecursive(mRoot, [](GameObject* obj) { obj->Resleep(); }); mAwakened = false; } void GameWorld::Update() { - ProjectBrussel_UNITY_ID::CallGameObjectRecursive(mRoot, [this](GameObject* obj) { + using namespace ProjectBrussel_UNITY_ID; + + CallGameObjectRecursive(mRoot, [this](GameObject* obj) { obj->Update(); }); } |