Made GLRenderer's Model pointer const

Thu, 09 Feb 2017 19:32:41 +0200

author
Teemu Piippo <teemu@hecknology.net>
date
Thu, 09 Feb 2017 19:32:41 +0200
changeset 1109
a55b2608a395
parent 1108
90d6f4b7782e
child 1110
ec3ee7da7806

Made GLRenderer's Model pointer const

src/glRenderer.cpp file | annotate | diff | comparison | revisions
src/glRenderer.h file | annotate | diff | comparison | revisions
--- a/src/glRenderer.cpp	Thu Feb 09 13:26:44 2017 +0200
+++ b/src/glRenderer.cpp	Thu Feb 09 19:32:41 2017 +0200
@@ -68,7 +68,7 @@
 
 // =============================================================================
 //
-GLRenderer::GLRenderer(Model* model, QWidget* parent) :
+GLRenderer::GLRenderer(const Model* model, QWidget* parent) :
     QGLWidget {parent},
     HierarchyElement {parent},
     m_model {model}
--- a/src/glRenderer.h	Thu Feb 09 13:26:44 2017 +0200
+++ b/src/glRenderer.h	Thu Feb 09 19:32:41 2017 +0200
@@ -72,7 +72,7 @@
 	Q_OBJECT
 
 public:
-	GLRenderer(Model* model, QWidget* parent = nullptr);
+	GLRenderer(const Model* model, QWidget* parent = nullptr);
 	~GLRenderer();
 
 	QColor backgroundColor() const;
@@ -144,7 +144,7 @@
 	}
 
 private:
-	Model* const m_model;
+	const Model* const m_model;
 	GLCompiler* m_compiler;
 	LDObject* m_objectAtCursor = nullptr;
 	CameraIcon m_cameraIcons[7];

mercurial