daily automatic beautifier

This commit is contained in:
MosesAdmin 2015-08-08 00:00:45 +01:00
parent 883c34aee9
commit 21aa5af640
29 changed files with 169 additions and 171 deletions

View File

@ -216,8 +216,7 @@ batch_run()
boost::shared_ptr<TranslationTask> task;
task = TranslationTask::create(source, ioWrapper, lscope);
if (cw)
{
if (cw) {
if (context_string.size())
context_window->push_back(context_string);
if(!use_sliding_context_window)

View File

@ -253,8 +253,7 @@ ReadInput(boost::shared_ptr<std::vector<std::string> >* cw)
source->SetTranslationId(m_currentLine++);
// when using a sliding context window, remove obsolete past input from buffer:
if (m_past_input.size() && m_look_back != std::numeric_limits<size_t>::max())
{
if (m_past_input.size() && m_look_back != std::numeric_limits<size_t>::max()) {
list<boost::shared_ptr<InputType> >::iterator m = m_past_input.end();
for (size_t cnt = 0; cnt < m_look_back && --m != m_past_input.begin();)
cnt += (*m)->GetSize();

View File

@ -52,8 +52,7 @@ public:
, m_isHoldingDebugStream(false) {}
OutputCollector(std::string xout, std::string xerr = "")
: m_nextOutput(0)
{
: m_nextOutput(0) {
// TO DO open magic streams instead of regular ofstreams! [UG]
if (xout == "/dev/stderr") {

View File

@ -182,7 +182,8 @@ bool TargetPhrase::HasTtaskSPtr() const
return m_ttask_flag;
}
const ttasksptr TargetPhrase::GetTtask() const {
const ttasksptr TargetPhrase::GetTtask() const
{
return m_ttask.lock();
}