Skip to content

Commit

Permalink
Merge pull request davideberly#35 from tbridel/hotfix/error_unused_va…
Browse files Browse the repository at this point in the history
…riables

Fix some unused variables triggering an error during compilation
  • Loading branch information
davideberly authored Dec 20, 2021
2 parents 348d4ae + 1bb5fcd commit 75cfcec
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 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
2 changes: 1 addition & 1 deletion GTE/Applications/GLX/WindowSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ namespace gte
// Window creation and destruction.
void CreateFrom(Window::Parameters& parameters);

char const* mDisplayName;
// char const* mDisplayName; /*< Unused variable */
_XDisplay* mDisplay;
std::map<unsigned long, std::shared_ptr<Window>> mWindowMap;
};
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 75cfcec

Please sign in to comment.