Skip to content

Commit

Permalink
Fix missing attribute callback in phrase copy constructor and assignm…
Browse files Browse the repository at this point in the history
…ent operators
  • Loading branch information
Jules Françoise committed May 3, 2016
1 parent 167cda8 commit 79386ec
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/core/trainingset/xmmPhrase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ xmm::Phrase::Phrase(Phrase const& src)
data_[0] = src.data_[0];
if (bimodal_) data_[1] = src.data_[1];
}
dimension.onAttributeChange(this, &xmm::Phrase::onAttributeChange);
dimension_input.onAttributeChange(this, &xmm::Phrase::onAttributeChange);
label.onAttributeChange(this, &xmm::Phrase::onAttributeChange);
}

xmm::Phrase::Phrase(Json::Value const& root)
Expand Down Expand Up @@ -193,6 +196,10 @@ xmm::Phrase& xmm::Phrase::operator=(Phrase const& src) {
data_[0] = src.data_[0];
if (bimodal_) data_[1] = src.data_[1];
}
dimension.onAttributeChange(this, &xmm::Phrase::onAttributeChange);
dimension_input.onAttributeChange(this,
&xmm::Phrase::onAttributeChange);
label.onAttributeChange(this, &xmm::Phrase::onAttributeChange);
}
return *this;
}
Expand Down

0 comments on commit 79386ec

Please sign in to comment.