Merge pull request #137 from stweil/master

Fix compiler warnings for copy constructors
This commit is contained in:
zdenop 2015-11-05 09:42:53 +01:00
commit 479fe9c370
4 changed files with 4 additions and 4 deletions

View File

@ -327,7 +327,7 @@ class WERD_RES : public ELIST_LINK {
}
// Deep copies everything except the ratings MATRIX.
// To get that use deep_copy below.
WERD_RES(const WERD_RES &source) {
WERD_RES(const WERD_RES &source) : ELIST_LINK(source) {
InitPointers();
*this = source; // see operator=
}

View File

@ -112,7 +112,7 @@ BLOB_CHOICE::BLOB_CHOICE(UNICHAR_ID src_unichar_id, // character id
*
* Constructor to build a BLOB_CHOICE from another BLOB_CHOICE.
*/
BLOB_CHOICE::BLOB_CHOICE(const BLOB_CHOICE &other) {
BLOB_CHOICE::BLOB_CHOICE(const BLOB_CHOICE &other) : ELIST_LINK(other) {
unichar_id_ = other.unichar_id();
rating_ = other.rating();
certainty_ = other.certainty();

View File

@ -288,7 +288,7 @@ class WERD_CHOICE : public ELIST_LINK {
src_certainty, src_permuter);
}
WERD_CHOICE(const char *src_string, const UNICHARSET &unicharset);
WERD_CHOICE(const WERD_CHOICE &word) : unicharset_(word.unicharset_) {
WERD_CHOICE(const WERD_CHOICE &word) : ELIST_LINK(word), unicharset_(word.unicharset_) {
this->init(word.length());
this->operator=(word);
}

View File

@ -432,7 +432,7 @@ class PointerVector : public GenericVector<T*> {
}
// Copy must be deep, as the pointers will be automatically deleted on
// destruction.
PointerVector(const PointerVector& other) {
PointerVector(const PointerVector& other) : GenericVector<T*>(other) {
this->init(other.size());
this->operator+=(other);
}