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-04-05 17:51:50 +0300
committerUlrich Germann <ulrich.germann@gmail.com>2015-04-05 17:51:50 +0300
commit3e2f878576880e4ae33d3f8e8d63ae989e76fc47 (patch)
tree2bee6e9e82b3bb3fc6926b2fef98497447d4d776 /moses/Syntax
parent34776c5e7cf0806d3a8b1d5725d87a9d573d4635 (diff)
parent02185a85fb5f78cf99228e034dc62f02c488dc8f (diff)
Merge branch 'master' into mmt-dev
Conflicts: Jamroot moses/TranslationModel/UG/mmsapt.h
Diffstat (limited to 'moses/Syntax')
-rw-r--r--moses/Syntax/Cube.cpp4
-rw-r--r--moses/Syntax/F2S/HyperTreeLoader.cpp2
-rw-r--r--moses/Syntax/F2S/RuleMatcherHyperTree-inl.h5
-rw-r--r--moses/Syntax/S2T/Parsers/Scope3Parser/Parser-inl.h2
-rw-r--r--moses/Syntax/S2T/Parsers/Scope3Parser/TailLatticeSearcher.h2
-rw-r--r--moses/Syntax/S2T/RuleTrieLoader.cpp4
6 files changed, 10 insertions, 9 deletions
diff --git a/moses/Syntax/Cube.cpp b/moses/Syntax/Cube.cpp
index 0249291d3..6cbf72903 100644
--- a/moses/Syntax/Cube.cpp
+++ b/moses/Syntax/Cube.cpp
@@ -56,7 +56,7 @@ void Cube::CreateNeighbours(const std::vector<int> &coordinates)
// Create each neighbour along the vertex stack dimensions.
for (std::size_t i = 0; i < coordinates.size()-1; ++i) {
- int x = coordinates[i];
+ const std::size_t x = coordinates[i];
if (m_bundle.stacks[i]->size() > x+1) {
++tmpCoordinates[i];
CreateNeighbour(tmpCoordinates);
@@ -64,7 +64,7 @@ void Cube::CreateNeighbours(const std::vector<int> &coordinates)
}
}
// Create the neighbour along the translation dimension.
- int x = coordinates.back();
+ const std::size_t x = coordinates.back();
if (m_bundle.translations->GetSize() > x+1) {
++tmpCoordinates.back();
CreateNeighbour(tmpCoordinates);
diff --git a/moses/Syntax/F2S/HyperTreeLoader.cpp b/moses/Syntax/F2S/HyperTreeLoader.cpp
index 0ffc3602f..f3caa2cec 100644
--- a/moses/Syntax/F2S/HyperTreeLoader.cpp
+++ b/moses/Syntax/F2S/HyperTreeLoader.cpp
@@ -3,7 +3,7 @@
#include <sys/stat.h>
#include <cmath>
-#include <stdlib.h>
+#include <cstdlib>
#include <fstream>
#include <string>
#include <iterator>
diff --git a/moses/Syntax/F2S/RuleMatcherHyperTree-inl.h b/moses/Syntax/F2S/RuleMatcherHyperTree-inl.h
index d7ce2cf7c..74f2347a6 100644
--- a/moses/Syntax/F2S/RuleMatcherHyperTree-inl.h
+++ b/moses/Syntax/F2S/RuleMatcherHyperTree-inl.h
@@ -190,8 +190,9 @@ int RuleMatcherHyperTree<Callback>::SubSeqLength(const HyperPath::NodeSeq &seq,
int pos)
{
int length = 0;
- while (pos != seq.size() && seq[pos] != HyperPath::kComma) {
- ++pos;
+ HyperPath::NodeSeq::size_type curpos = pos;
+ while (curpos != seq.size() && seq[curpos] != HyperPath::kComma) {
+ ++curpos;
++length;
}
return length;
diff --git a/moses/Syntax/S2T/Parsers/Scope3Parser/Parser-inl.h b/moses/Syntax/S2T/Parsers/Scope3Parser/Parser-inl.h
index f50cee3a0..24135c734 100644
--- a/moses/Syntax/S2T/Parsers/Scope3Parser/Parser-inl.h
+++ b/moses/Syntax/S2T/Parsers/Scope3Parser/Parser-inl.h
@@ -163,7 +163,7 @@ void Scope3Parser<Callback>::RecordPatternApplicationSpans(
for (int j = std::max(e1, i+minSpan-1); j <= e2; ++j) {
std::size_t span = j-i+1;
assert(span >= 1);
- if (span < minSpan) {
+ if (span < std::size_t(minSpan)) {
continue;
}
if (m_maxChartSpan && span > m_maxChartSpan) {
diff --git a/moses/Syntax/S2T/Parsers/Scope3Parser/TailLatticeSearcher.h b/moses/Syntax/S2T/Parsers/Scope3Parser/TailLatticeSearcher.h
index 4e48429ab..4f815c78d 100644
--- a/moses/Syntax/S2T/Parsers/Scope3Parser/TailLatticeSearcher.h
+++ b/moses/Syntax/S2T/Parsers/Scope3Parser/TailLatticeSearcher.h
@@ -58,7 +58,7 @@ private:
const int absStart = m_ranges[0].minStart + offset;
const int minWidth = std::max(1, range.minEnd - absStart + 1);
- const int maxWidth = range.maxEnd - absStart + 1;
+ const std::size_t maxWidth = range.maxEnd - absStart + 1;
const std::vector<std::vector<const PVertex *> > &innerVec =
m_lattice[offset][nonTermIndex+1];
diff --git a/moses/Syntax/S2T/RuleTrieLoader.cpp b/moses/Syntax/S2T/RuleTrieLoader.cpp
index b9f7484ad..a88c0f5fe 100644
--- a/moses/Syntax/S2T/RuleTrieLoader.cpp
+++ b/moses/Syntax/S2T/RuleTrieLoader.cpp
@@ -1,14 +1,14 @@
#include "RuleTrieLoader.h"
#include <sys/stat.h>
-#include <stdlib.h>
+#include <cstdlib>
#include <fstream>
#include <string>
#include <iterator>
#include <algorithm>
#include <iostream>
-#include <math.h>
+#include <cmath>
#include "moses/FactorCollection.h"
#include "moses/Word.h"