[Kdenlive-devel] [PATCH kdenlive 10/27] initialize variables in constructor

Mikko Rapeli mikko.rapeli at iki.fi
Sun Aug 28 10:24:50 UTC 2011


Found by cppcheck:

[../src/dvdwizardmenu.h:39]: (warning) Member variable 'DvdScene::m_width' is not initialized in the constructor.
[../src/dvdwizardmenu.h:39]: (warning) Member variable 'DvdScene::m_height' is not initialized in the constructor.
---
 src/dvdwizardmenu.h |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/dvdwizardmenu.h b/src/dvdwizardmenu.h
index 6a9d44c..8c9931e 100644
--- a/src/dvdwizardmenu.h
+++ b/src/dvdwizardmenu.h
@@ -36,7 +36,9 @@ class DvdScene : public QGraphicsScene
 {
 
 public:
-    DvdScene(QObject * parent = 0): QGraphicsScene(parent) {}
+    DvdScene(QObject * parent = 0): QGraphicsScene(parent) {
+        m_width = 0; m_height = 0;
+    }
     void setProfile(int width, int height) {
         m_width = width;
         m_height = height;
-- 
1.7.5.4





More information about the Kdenlive mailing list