Skip to content

Commit dbc4bc5

Browse files
dcwhiteRubioJr9
authored andcommitted
Fix uninitialized members in render code
1 parent 26283b9 commit dbc4bc5

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

src/Interface/Modules/Render/ES/Core.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ namespace SCIRun {
3636
namespace Render {
3737

3838
/// Entity system core sitting on top of Acorn.
39-
class ESCore : public spire::Acorn
39+
class ESCore final : public spire::Acorn
4040
{
4141
public:
4242
ESCore();
43-
virtual ~ESCore();
43+
~ESCore() override;
4444

4545
std::string toString(std::string prefix) const;
4646

@@ -50,12 +50,14 @@ namespace Render {
5050
void runGCOnNextExecution(){runGC = true;}
5151
bool hasShaderPromise() const;
5252

53+
ESCore(const ESCore&) = delete;
54+
ESCore& operator=(const ESCore&) = delete;
5355
private:
5456
bool hasGeomPromise() const;
5557

5658
spire::GLState mDefaultGLState; ///< Default OpenGL state.
5759
double mCurrentTime; ///< Current system time calculated from constant frame time.
58-
bool runGC;
60+
bool runGC {false};
5961
float r_, g_, b_, a_;
6062
};
6163

src/Interface/Modules/Render/ES/ObjectTransformCalculators.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ class SCISHARE ObjectAxisTranslationCalculator : public ObjectTransformCalculato
217217
gen::Transform computeTransform(int x, int y) const override;
218218
Core::Datatypes::WidgetMovement movementType() const override { return Core::Datatypes::TRANSLATE; }
219219
private:
220-
glm::mat4 invViewProj_;
220+
glm::mat4 invViewProj_ {1.0};
221221
glm::vec2 initialPosition_;
222222
glm::vec3 axis_;
223223
float w_;

src/Interface/Modules/Render/ViewScene.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ namespace SCIRun {
328328
bool shiftdown_ {false};
329329
bool mouseButtonPressed_ {false};
330330
Graphics::Datatypes::WidgetHandle selectedWidget_;
331-
Core::Datatypes::WidgetMovement movementType_;
331+
Core::Datatypes::WidgetMovement movementType_ {Core::Datatypes::NONE};
332332
int clippingPlaneIndex_ {0};
333333
const static int delayAfterModuleExecution_ {200};
334334
const static int delayAfterWidgetColorRestored_ {50};

0 commit comments

Comments
 (0)