Fix initialization order
authorThomas Jarosch <thomas.jarosch@intra2net.com>
Mon, 17 Oct 2011 08:46:30 +0000 (10:46 +0200)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Mon, 17 Oct 2011 08:46:30 +0000 (10:46 +0200)
src/tmpfstream.hpp

index 6760ccd..f3f5eb0 100644 (file)
@@ -82,7 +82,9 @@ public:
     * @brief Constructs an unopened tmpfstreamTempl.
     */
     tmpfstreamTempl()
-        : unlinked(false), fd(-1), bio::stream<Device, Tr, Alloc>()
+        : bio::stream<Device, Tr, Alloc>()
+        , unlinked(false)
+        , fd(-1)
         { }
 
     /**
@@ -98,7 +100,9 @@ public:
     tmpfstreamTempl(const std::string& tmpnametemplate, 
                std::ios_base::open_mode mode = std::ios_base::out,
                int buffer_size = -1 , int pback_size = -1)
-        : unlinked(false), fd(-1), bio::stream<Device, Tr, Alloc>()
+        : bio::stream<Device, Tr, Alloc>()
+        , unlinked(false)
+        , fd(-1)
     {
         open(tmpnametemplate,mode,buffer_size,pback_size);
     }
@@ -184,10 +188,11 @@ public:
     * @brief Constructs an unopened tmpfcopystreamTempl.
     */
     tmpfcopystreamTempl()
-        : full_sync(default_full_sync),
-          filemode_on_close(default_filemode_on_close),
-          UserOnClose(), GroupOnClose(),
-          tmpfstreamTempl<Device, Tr, Alloc>()
+        : tmpfstreamTempl<Device, Tr, Alloc>()
+        , full_sync(default_full_sync)
+        , filemode_on_close(default_filemode_on_close)
+        , UserOnClose()
+        , GroupOnClose()
         { }
 
     /**
@@ -203,12 +208,12 @@ public:
     tmpfcopystreamTempl(const std::string& filename,
                std::ios_base::open_mode mode = std::ios_base::out,
                int buffer_size = -1 , int pback_size = -1)
-        : full_sync(default_full_sync),
-          filemode_on_close(default_filemode_on_close),
-          UserOnClose(), GroupOnClose(),
-          originalfilename(filename),
-          tmpfstreamTempl<Device, Tr, Alloc>
-            (filename+default_template_suffix,mode,buffer_size,pback_size)
+        : tmpfstreamTempl<Device, Tr, Alloc>(filename+default_template_suffix,mode,buffer_size,pback_size)
+        , originalfilename(filename)
+        , full_sync(default_full_sync)
+        , filemode_on_close(default_filemode_on_close)
+        , UserOnClose()
+        , GroupOnClose()
         { }
 
     /**
@@ -228,12 +233,12 @@ public:
                const std::string& tmpnametemplate,
                std::ios_base::open_mode mode = std::ios_base::out,
                int buffer_size = -1 , int pback_size = -1)
-        : full_sync(default_full_sync),
-          filemode_on_close(default_filemode_on_close),
-          UserOnClose(), GroupOnClose(),
-          originalfilename(filename), 
-          tmpfstreamTempl<Device, Tr, Alloc>
-            (tmpnametemplate,mode,buffer_size,pback_size)
+        : tmpfstreamTempl<Device, Tr, Alloc>(tmpnametemplate,mode,buffer_size,pback_size)
+        , originalfilename(filename)
+        , full_sync(default_full_sync)
+        , filemode_on_close(default_filemode_on_close)
+        , UserOnClose()
+        , GroupOnClose()
         { }
 
     ~tmpfcopystreamTempl()