diff options
author | Phil Williams <philip.williams@mac.com> | 2015-11-27 15:20:38 +0300 |
---|---|---|
committer | Phil Williams <philip.williams@mac.com> | 2015-11-27 15:20:38 +0300 |
commit | 7375d81e163d3c706302150d6bb3f07f7dda0db5 (patch) | |
tree | 864d223a2bad6559069ed7235598c0e010aeadcd /moses/Syntax | |
parent | b0e7d30fc6acd755c1c47b037ebc761b2d03929b (diff) |
Fix a few compiler warnings (clang)
Diffstat (limited to 'moses/Syntax')
-rw-r--r-- | moses/Syntax/F2S/HyperPathLoader.cpp | 7 | ||||
-rw-r--r-- | moses/Syntax/F2S/HyperPathLoader.h | 4 | ||||
-rw-r--r-- | moses/Syntax/F2S/HyperTreeLoader.cpp | 6 | ||||
-rw-r--r-- | moses/Syntax/T2S/RuleTrieLoader.cpp | 4 |
4 files changed, 3 insertions, 18 deletions
diff --git a/moses/Syntax/F2S/HyperPathLoader.cpp b/moses/Syntax/F2S/HyperPathLoader.cpp index 9ae2c731f..4d4d677c3 100644 --- a/moses/Syntax/F2S/HyperPathLoader.cpp +++ b/moses/Syntax/F2S/HyperPathLoader.cpp @@ -9,13 +9,6 @@ namespace Syntax namespace F2S { -HyperPathLoader::HyperPathLoader(FactorDirection direction, - const std::vector<FactorType> &factorOrder) - : m_direction(direction) - , m_factorOrder(factorOrder) -{ -} - void HyperPathLoader::Load(const StringPiece &s, HyperPath &path) { path.nodeSeqs.clear(); diff --git a/moses/Syntax/F2S/HyperPathLoader.h b/moses/Syntax/F2S/HyperPathLoader.h index 3a3586a8e..120ed1b8e 100644 --- a/moses/Syntax/F2S/HyperPathLoader.h +++ b/moses/Syntax/F2S/HyperPathLoader.h @@ -30,8 +30,6 @@ namespace F2S class HyperPathLoader { public: - HyperPathLoader(FactorDirection, const std::vector<FactorType> &); - void Load(const StringPiece &, HyperPath &); private: @@ -58,8 +56,6 @@ private: return FactorCollection::Instance().AddFactor(s, true); } - FactorDirection m_direction; - const std::vector<FactorType> &m_factorOrder; std::vector<TreeFragmentToken> m_tokenSeq; std::vector<NodeTuple> m_nodeTupleSeq; std::stack<int> m_parentStack; diff --git a/moses/Syntax/F2S/HyperTreeLoader.cpp b/moses/Syntax/F2S/HyperTreeLoader.cpp index d5ef65c5e..03305a017 100644 --- a/moses/Syntax/F2S/HyperTreeLoader.cpp +++ b/moses/Syntax/F2S/HyperTreeLoader.cpp @@ -60,7 +60,7 @@ bool HyperTreeLoader::Load(const std::vector<FactorType> &input, double_conversion::StringToDoubleConverter converter(double_conversion::StringToDoubleConverter::NO_FLAGS, NAN, NAN, "inf", "nan"); - HyperPathLoader hyperPathLoader(Input, input); + HyperPathLoader hyperPathLoader; Phrase dummySourcePhrase; { @@ -87,9 +87,7 @@ bool HyperTreeLoader::Load(const std::vector<FactorType> &input, alignString = temp; } - if (++pipes) { - StringPiece str(*pipes); //counts - } + ++pipes; // counts scoreVector.clear(); for (util::TokenIter<util::AnyCharacter, true> s(scoreString, " \t"); s; ++s) { diff --git a/moses/Syntax/T2S/RuleTrieLoader.cpp b/moses/Syntax/T2S/RuleTrieLoader.cpp index 71d4b24d0..bcfcc819e 100644 --- a/moses/Syntax/T2S/RuleTrieLoader.cpp +++ b/moses/Syntax/T2S/RuleTrieLoader.cpp @@ -77,9 +77,7 @@ bool RuleTrieLoader::Load(const std::vector<FactorType> &input, alignString = temp; } - if (++pipes) { - StringPiece str(*pipes); //counts - } + ++pipes; // counts bool isLHSEmpty = (sourcePhraseString.find_first_not_of(" \t", 0) == std::string::npos); if (isLHSEmpty && !staticData.IsWordDeletionEnabled()) { |