mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-12-18 11:28:51 +08:00
Merge pull request #137 from stweil/master
Fix compiler warnings for copy constructors
This commit is contained in:
commit
479fe9c370
@ -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=
|
||||
}
|
||||
|
@ -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();
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user