mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2025-01-07 20:17:48 +03:00
delete m_translationId variable
This commit is contained in:
parent
c21ae90943
commit
d744400a33
@ -146,8 +146,10 @@ int main(int argc, char* argv[])
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// read each sentence & decode
|
// read each sentence & decode
|
||||||
InputType *source=0;
|
InputType *source=NULL;
|
||||||
|
size_t lineCount = staticData.GetStartTranslationId();
|
||||||
while(ReadInput(*ioWrapper,staticData.GetInputType(),source)) {
|
while(ReadInput(*ioWrapper,staticData.GetInputType(),source)) {
|
||||||
|
source->SetTranslationId(lineCount);
|
||||||
IFVERBOSE(1)
|
IFVERBOSE(1)
|
||||||
ResetUserTime();
|
ResetUserTime();
|
||||||
|
|
||||||
@ -161,6 +163,7 @@ int main(int argc, char* argv[])
|
|||||||
task->Run();
|
task->Run();
|
||||||
delete task;
|
delete task;
|
||||||
#endif
|
#endif
|
||||||
|
++lineCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WITH_THREADS
|
#ifdef WITH_THREADS
|
||||||
|
@ -215,10 +215,6 @@ IOWrapper::
|
|||||||
GetInput(InputType* inputType)
|
GetInput(InputType* inputType)
|
||||||
{
|
{
|
||||||
if(inputType->Read(*m_inputStream, m_inputFactorOrder)) {
|
if(inputType->Read(*m_inputStream, m_inputFactorOrder)) {
|
||||||
if (long x = inputType->GetTranslationId()) {
|
|
||||||
if (x>=m_translationId) m_translationId = x+1;
|
|
||||||
} else inputType->SetTranslationId(m_translationId++);
|
|
||||||
|
|
||||||
return inputType;
|
return inputType;
|
||||||
} else {
|
} else {
|
||||||
delete inputType;
|
delete inputType;
|
||||||
|
@ -169,10 +169,6 @@ void IOWrapperChart::ResetTranslationId()
|
|||||||
InputType*IOWrapperChart::GetInput(InputType* inputType)
|
InputType*IOWrapperChart::GetInput(InputType* inputType)
|
||||||
{
|
{
|
||||||
if(inputType->Read(*m_inputStream, m_inputFactorOrder)) {
|
if(inputType->Read(*m_inputStream, m_inputFactorOrder)) {
|
||||||
if (long x = inputType->GetTranslationId()) {
|
|
||||||
if (x>=m_translationId) m_translationId = x+1;
|
|
||||||
} else inputType->SetTranslationId(m_translationId++);
|
|
||||||
|
|
||||||
return inputType;
|
return inputType;
|
||||||
} else {
|
} else {
|
||||||
delete inputType;
|
delete inputType;
|
||||||
|
Loading…
Reference in New Issue
Block a user