[pan: 9/22] Few more fixes
- From: Dominique Dumont <ddumont src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pan: 9/22] Few more fixes
- Date: Sun, 18 Sep 2022 16:35:38 +0000 (UTC)
commit ad97a49f55a902db8510e7353c8cf80b5f36cfbe
Author: Thomas Tanner <thosrtanner googlemail com>
Date: Sun Jul 3 22:33:37 2022 +0100
Few more fixes
pan/tasks/adaptable-set-test.cc | 4 ++--
pan/tasks/decoder.cc | 13 +++++++++++--
pan/tasks/encoder.cc | 39 ++++++++++++++++++++++++++++++++++++---
3 files changed, 49 insertions(+), 7 deletions(-)
---
diff --git a/pan/tasks/adaptable-set-test.cc b/pan/tasks/adaptable-set-test.cc
index b355103..dfdbd4f 100644
--- a/pan/tasks/adaptable-set-test.cc
+++ b/pan/tasks/adaptable-set-test.cc
@@ -40,7 +40,7 @@ class MyListener:
void clear () {
index_of_added = index_of_removed = old_index_of_moved = new_index_of_moved = -1;
}
- MyListener () {
+ MyListener () : value() {
clear ();
}
bool empty () const {
@@ -317,6 +317,6 @@ int main ()
check (m[12] == 20)
check (m[13] == 25)
check (m[14] == 30)
-
+
return 0;
}
diff --git a/pan/tasks/decoder.cc b/pan/tasks/decoder.cc
index 0e6f62a..30bae8e 100644
--- a/pan/tasks/decoder.cc
+++ b/pan/tasks/decoder.cc
@@ -21,6 +21,8 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*
*/
+#include "decoder.h"
+
#include <config.h>
#include <cerrno>
#include <ostream>
@@ -33,11 +35,16 @@
#include <pan/general/file-util.h>
#include <pan/general/macros.h>
#include <pan/general/utf8-utils.h>
-#include "decoder.h"
-using namespace pan;
+namespace pan {
Decoder :: Decoder (WorkerPool& pool):
+ mark_read(false),
+ task(nullptr),
+ save_mode(TaskArticle::NONE),
+ options(TaskArticle::SAVE_AS),
+ percent(0.0),
+ num_scanned_files(0),
_worker_pool (pool),
_gsourceid (-1),
health(OK)
@@ -340,3 +347,5 @@ Decoder :: disable_progress_update ()
_gsourceid = -1;
}
}
+
+}
diff --git a/pan/tasks/encoder.cc b/pan/tasks/encoder.cc
index 9b2bb7f..e197e6c 100644
--- a/pan/tasks/encoder.cc
+++ b/pan/tasks/encoder.cc
@@ -21,6 +21,8 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*
*/
+#include "encoder.h"
+
#include <config.h>
#include <algorithm>
#include <cerrno>
@@ -41,12 +43,41 @@ extern "C" {
#include <pan/general/file-util.h>
#include <pan/general/macros.h>
#include <pan/general/utf8-utils.h>
-#include "encoder.h"
-
-using namespace pan;
+namespace pan {
+/*
+ ^
+pan\tasks\encoder.cc:49:12: warning: Member variable 'Encoder::parts' is not initialized in the constructor.
[uninitMemberVar]
+Encoder :: Encoder (WorkerPool& pool):
+ ^
+pan\tasks\encoder.cc:49:12: warning: Member variable 'Encoder::task' is not initialized in the constructor.
[uninitMemberVar]
+Encoder :: Encoder (WorkerPool& pool):
+ ^
+pan\tasks\encoder.cc:49:12: warning: Member variable 'Encoder::bpf' is not initialized in the constructor.
[uninitMemberVar]
Encoder :: Encoder (WorkerPool& pool):
+ ^
+pan\tasks\encoder.cc:49:12: warning: Member variable 'Encoder::cache' is not initialized in the constructor.
[uninitMemberVar]
+Encoder :: Encoder (WorkerPool& pool):
+ ^
+pan\tasks\encoder.cc:49:12: warning: Member variable 'Encoder::needed' is not initialized in the
constructor. [uninitMemberVar]
+Encoder :: Encoder (WorkerPool& pool):
+ ^
+pan\tasks\encoder.cc:49:12: warning: Member variable 'Encoder::article' is not initialized in the
constructor. [uninitMemberVar]
+Encoder :: Encoder (WorkerPool& pool):
+ ^
+pan\tasks\encoder.cc:49:12: warning: Member variable 'Encoder::percent' is not initialized in the
constructor. [uninitMemberVar]
+Encoder :: Encoder (WorkerPool& pool):
+ ^
+*/
+Encoder :: Encoder (WorkerPool& pool):
+ parts(0),
+ task(nullptr),
+ bpf(0),
+ cache(nullptr),
+ needed(nullptr),
+ article(nullptr),
+ percent(0.0),
_worker_pool (pool),
_gsourceid (-1),
health(OK)
@@ -288,3 +319,5 @@ Encoder :: disable_progress_update ()
_gsourceid = -1;
}
}
+
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]