Skip to content

Commit

Permalink
Fix some unused variables triggering an error during compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
tbridel committed Dec 20, 2021
1 parent 92d14e7 commit 4076e93
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion GTE/Applications/GLX/WindowSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ WindowSystem::~WindowSystem()

WindowSystem::WindowSystem()
:
mDisplayName("GTEngineWindow"),
// mDisplayName("GTEngineWindow"), /*< Unused variables */
mDisplay(nullptr)
{
// Connect to the X server.
Expand Down
4 changes: 2 additions & 2 deletions GTE/Graphics/GL45/GL45.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
#include <vector>

// Support for versioning.
int constexpr OPENGL_VERSION_NONE = 0;
int constexpr OPENGL_VERSION_1_0 = 10;
// int constexpr OPENGL_VERSION_NONE = 0; /*< Unused variable */
// int constexpr OPENGL_VERSION_1_0 = 10; /*< Unused variable */
int constexpr OPENGL_VERSION_1_1 = 11;
int constexpr OPENGL_VERSION_1_2 = 12;
int constexpr OPENGL_VERSION_1_3 = 13;
Expand Down
2 changes: 1 addition & 1 deletion GTE/Graphics/GL45/GL45InputLayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ GL45InputLayout::~GL45InputLayout()
GL45InputLayout::GL45InputLayout(GLuint programHandle, GLuint vbufferHandle,
VertexBuffer const* vbuffer)
:
mProgramHandle(programHandle),
// mProgramHandle(programHandle), /*< Unused variable */
mVBufferHandle(vbufferHandle),
mNumAttributes(0)
{
Expand Down
2 changes: 1 addition & 1 deletion GTE/Graphics/GL45/GL45InputLayout.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace gte
void Disable();

private:
GLuint mProgramHandle;
// GLuint mProgramHandle; /*< Unused variable */
GLuint mVBufferHandle;
GLuint mVArrayHandle;

Expand Down
6 changes: 3 additions & 3 deletions GTE/Graphics/MorphController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,12 @@ bool MorphController::Update(double applicationTime)
float const* weights0 = &mWeights[key0 * mNumTargets];
float const* weights1 = &mWeights[key1 * mNumTargets];
Vector3<float> const* vertices = mVertices.data();
float wsum0 = 0.0f, wsum1 = 0.0f;
// float wsum0 = 0.0f, wsum1 = 0.0f; /*< Unused variables */
for (size_t n = 0; n < mNumTargets; ++n)
{
float w = oneMinusNormTime * weights0[n] + normTime * weights1[n];
wsum0 += weights0[n];
wsum1 += weights1[n];
// wsum0 += weights0[n]; /*< Unused variables */
// wsum1 += weights1[n]; /*< Unused variables */
combination = vbuffer->GetData();
for (size_t m = 0; m < mNumVertices; ++m)
{
Expand Down

0 comments on commit 4076e93

Please sign in to comment.