[pan: 20/22] Fix initialiser ordering Make ordering check permanent




commit 7f4df7e4f8dae4fed9ff365804c6c4753ac82a21
Author: Thomas Tanner <thosrtanner googlemail com>
Date:   Sat Jul 23 08:59:39 2022 +0100

    Fix initialiser ordering
    Make ordering check permanent

 configure.ac         | 3 +++
 pan/tasks/decoder.cc | 2 +-
 pan/tasks/encoder.cc | 4 ++--
 3 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 50f8b67..f2d55d5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -319,6 +319,9 @@ case $host_os in
 esac
 AM_CONDITIONAL([HAVE_WIN32],[test "$win32" = "yes"])
 
+dnl Sanity checking
+CXXFLAGS="$CXXFLAGS -Wreorder"
+
 dnl Build the output files
 AC_SUBST(panlocaledir)
 AC_CONFIG_FILES([Makefile
diff --git a/pan/tasks/decoder.cc b/pan/tasks/decoder.cc
index 9920df3..f163406 100644
--- a/pan/tasks/decoder.cc
+++ b/pan/tasks/decoder.cc
@@ -42,12 +42,12 @@ namespace pan {
 
 Decoder :: Decoder (WorkerPool& pool):
   mark_read(false),
+  health(OK),
   task(nullptr),
   save_mode(TaskArticle::NONE),
   options(TaskArticle::SAVE_AS),
   percent(0.0),
   num_scanned_files(0),
-  health(OK),
   _worker_pool (pool),
   _gsourceid (-1)
 {
diff --git a/pan/tasks/encoder.cc b/pan/tasks/encoder.cc
index fd9bff0..1573121 100644
--- a/pan/tasks/encoder.cc
+++ b/pan/tasks/encoder.cc
@@ -49,6 +49,7 @@ namespace pan {
 
 
 Encoder :: Encoder (WorkerPool& pool):
+  health(OK),
   parts(0),
   task(nullptr),
   bpf(0),
@@ -57,8 +58,7 @@ Encoder :: Encoder (WorkerPool& pool):
   article(nullptr),
   percent(0.0),
   _worker_pool (pool),
-  _gsourceid (-1),
-  health(OK)
+  _gsourceid (-1)
 {}
 
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]