Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Germann <Ulrich.Germann@gmail.com>2015-07-23 02:06:54 +0300
committerUlrich Germann <Ulrich.Germann@gmail.com>2015-07-23 02:06:54 +0300
commit56da7122837ef8f2fa245739d0d5b39b03bcb7e9 (patch)
treedd6f9ee0e9213d98af04266634c5fb6302899217
parent5aaa8fcbfae98765144d5914e083dacaace5ad60 (diff)
Bug fix: TargetPhrase::GetTtask() must return shared pointer, not reference to shared pointer.
-rw-r--r--moses/TargetPhrase.cpp2
-rw-r--r--moses/TargetPhrase.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/moses/TargetPhrase.cpp b/moses/TargetPhrase.cpp
index 8e95fc0aa..da1d9edae 100644
--- a/moses/TargetPhrase.cpp
+++ b/moses/TargetPhrase.cpp
@@ -181,7 +181,7 @@ bool TargetPhrase::HasTtaskSPtr() const {
return m_ttask_flag;
}
-const ttasksptr& TargetPhrase::GetTtask() const {
+const ttasksptr TargetPhrase::GetTtask() const {
return m_ttask.lock();
}
diff --git a/moses/TargetPhrase.h b/moses/TargetPhrase.h
index 460dcc33f..56ed27af3 100644
--- a/moses/TargetPhrase.h
+++ b/moses/TargetPhrase.h
@@ -92,7 +92,7 @@ public:
TargetPhrase(ttasksptr &ttask, const PhraseDictionary *pt = NULL);
TargetPhrase(ttasksptr &ttask, std::string out_string, const PhraseDictionary *pt = NULL);
explicit TargetPhrase(ttasksptr &ttask, const Phrase &targetPhrase, const PhraseDictionary *pt);
- const ttasksptr& GetTtask() const;
+ const ttasksptr GetTtask() const;
bool HasTtaskSPtr() const;
~TargetPhrase();