diff liboctave/oct-time.h @ 11501:331fcc41ca23

data member initialization fixes
author John W. Eaton <jwe@octave.org>
date Thu, 13 Jan 2011 03:04:51 -0500
parents 9684b3c3b417
children fd0a3ac60b0e
line wrap: on
line diff
--- a/liboctave/oct-time.h
+++ b/liboctave/oct-time.h
@@ -333,10 +333,13 @@
 public:
 
   octave_strptime (const std::string& str, const std::string& fmt)
-    : octave_base_tm () { init (str, fmt); }
+    : octave_base_tm (), nchars (0)
+  {
+    init (str, fmt);
+  }
 
   octave_strptime (const octave_strptime& s)
-    : octave_base_tm (s) { nchars = s.nchars; }
+    : octave_base_tm (s), nchars (s.nchars) { }
 
   octave_strptime& operator = (const octave_strptime& s)
   {