Skip to content

Commit 479fe9c

Browse files
committed
Merge pull request #137 from stweil/master
Fix compiler warnings for copy constructors
2 parents 4063738 + 4a92ff5 commit 479fe9c

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

ccstruct/pageres.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ class WERD_RES : public ELIST_LINK {
327327
}
328328
// Deep copies everything except the ratings MATRIX.
329329
// To get that use deep_copy below.
330-
WERD_RES(const WERD_RES &source) {
330+
WERD_RES(const WERD_RES &source) : ELIST_LINK(source) {
331331
InitPointers();
332332
*this = source; // see operator=
333333
}

ccstruct/ratngs.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ BLOB_CHOICE::BLOB_CHOICE(UNICHAR_ID src_unichar_id, // character id
112112
*
113113
* Constructor to build a BLOB_CHOICE from another BLOB_CHOICE.
114114
*/
115-
BLOB_CHOICE::BLOB_CHOICE(const BLOB_CHOICE &other) {
115+
BLOB_CHOICE::BLOB_CHOICE(const BLOB_CHOICE &other) : ELIST_LINK(other) {
116116
unichar_id_ = other.unichar_id();
117117
rating_ = other.rating();
118118
certainty_ = other.certainty();

ccstruct/ratngs.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ class WERD_CHOICE : public ELIST_LINK {
288288
src_certainty, src_permuter);
289289
}
290290
WERD_CHOICE(const char *src_string, const UNICHARSET &unicharset);
291-
WERD_CHOICE(const WERD_CHOICE &word) : unicharset_(word.unicharset_) {
291+
WERD_CHOICE(const WERD_CHOICE &word) : ELIST_LINK(word), unicharset_(word.unicharset_) {
292292
this->init(word.length());
293293
this->operator=(word);
294294
}

ccutil/genericvector.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ class PointerVector : public GenericVector<T*> {
432432
}
433433
// Copy must be deep, as the pointers will be automatically deleted on
434434
// destruction.
435-
PointerVector(const PointerVector& other) {
435+
PointerVector(const PointerVector& other) : GenericVector<T*>(other) {
436436
this->init(other.size());
437437
this->operator+=(other);
438438
}

0 commit comments

Comments
 (0)