changeset 12123:9ea6f69259d7

more constructor initialization fixes
author Pascal Dupuis <Pascal.Dupuis@uclouvain.be>
date Sat, 22 Jan 2011 02:34:42 -0500
parents f4689107dd8c
children cd82f5933c73
files src/ChangeLog src/mex.cc src/ov-mex-fcn.h src/txt-eng-ft.cc
diffstat 4 files changed, 15 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2011-01-22  Pascal Dupuis <Pascal.Dupuis@worldonline.be>
+
+	* ov-mex-fcn.h, txt-eng-ft.cc, mex.cc:
+	Initialize all data members in initialization list.
+
 2011-01-22  Pascal Dupuis <Pascal.Dupuis@worldonline.be>
 
 	* DLD-FUNCTIONS/__init_fltk__.cc (fltk_uimenu): Disallow copying.
--- a/src/mex.cc
+++ b/src/mex.cc
@@ -1501,13 +1501,12 @@
 
   mxArray_sparse (mxClassID id_arg, int m, int n, int nzmax_arg,
                   mxComplexity flag = mxREAL)
-    : mxArray_matlab (id_arg, m, n), nzmax (nzmax_arg)
-  {
-    pr = (calloc (nzmax, get_element_size ()));
-    pi = (flag == mxCOMPLEX ? calloc (nzmax, get_element_size ()) : 0);
-    ir = static_cast<mwIndex *> (calloc (nzmax, sizeof (mwIndex)));
-    jc = static_cast<mwIndex *> (calloc (n + 1, sizeof (mwIndex)));
-  }
+    : mxArray_matlab (id_arg, m, n), nzmax (nzmax_arg),
+      pr (calloc (nzmax, get_element_size ())),
+      pi (flag == mxCOMPLEX ? calloc (nzmax, get_element_size ()) : 0),
+      ir (static_cast<mwIndex *> (calloc (nzmax, sizeof (mwIndex)))),
+      jc (static_cast<mwIndex *> (calloc (n + 1, sizeof (mwIndex))))
+    { }
 
   mxArray_sparse *dup (void) const { return new mxArray_sparse (*this); }
 
--- a/src/ov-mex-fcn.h
+++ b/src/ov-mex-fcn.h
@@ -43,7 +43,9 @@
 {
 public:
 
-  octave_mex_function (void) { }
+  octave_mex_function (void)
+    : mex_fcn_ptr (), exit_fcn_ptr (), have_fmex (), sh_lib (), 
+      t_checked (), system_fcn_file () { }
 
   octave_mex_function (void *fptr, bool fmex, const octave_shlib& shl,
                        const std::string& nm = std::string ());
--- a/src/txt-eng-ft.cc
+++ b/src/txt-eng-ft.cc
@@ -75,7 +75,7 @@
 
   ft_manager& operator = (const ft_manager&);
 
-  ft_manager (void)
+  ft_manager (void) : library (), fc_init_done (false)
     {
       if (FT_Init_FreeType (&library))
         {