mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-24 04:12:47 +03:00
Fix a few more compiler warnings (from Clang mostly).
This commit is contained in:
parent
ee57e59f2b
commit
05ecc914c2
@ -50,8 +50,8 @@ DecodeFeature::DecodeFeature(size_t numScoreComponents
|
||||
, const std::vector<FactorType> &output
|
||||
, const std::string &line)
|
||||
: StatelessFeatureFunction(numScoreComponents, line)
|
||||
, m_container(NULL)
|
||||
, m_input(input), m_output(output)
|
||||
, m_container(NULL)
|
||||
{
|
||||
m_inputFactors = FactorMask(input);
|
||||
m_outputFactors = FactorMask(output);
|
||||
|
@ -87,6 +87,7 @@ protected:
|
||||
class CdecFF
|
||||
{
|
||||
public:
|
||||
virtual ~CdecFF() {}
|
||||
virtual int StateSize() const = 0;
|
||||
};
|
||||
|
||||
|
@ -45,7 +45,7 @@ size_t InternalTree::AddSubTree(const std::string & line, size_t pos) {
|
||||
}
|
||||
}
|
||||
else if (token == ' ' || token == ']') {
|
||||
if (value.size() > 0 && ! m_value.size() > 0) {
|
||||
if (value.size() > 0 && !(m_value.size() > 0)) {
|
||||
m_value = value;
|
||||
}
|
||||
else if (value.size() > 0) {
|
||||
@ -227,4 +227,4 @@ bool InternalTree::RecursiveSearch(const std::vector<NTLabel> & labels, std::vec
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -39,14 +39,12 @@ ChartRuleLookupManagerOnDisk::ChartRuleLookupManagerOnDisk(
|
||||
const PhraseDictionaryOnDisk &dictionary,
|
||||
OnDiskPt::OnDiskWrapper &dbWrapper,
|
||||
const std::vector<FactorType> &inputFactorsVec,
|
||||
const std::vector<FactorType> &outputFactorsVec,
|
||||
const std::string &filePath)
|
||||
const std::vector<FactorType> &outputFactorsVec)
|
||||
: ChartRuleLookupManagerCYKPlus(parser, cellColl)
|
||||
, m_dictionary(dictionary)
|
||||
, m_dbWrapper(dbWrapper)
|
||||
, m_inputFactorsVec(inputFactorsVec)
|
||||
, m_outputFactorsVec(outputFactorsVec)
|
||||
, m_filePath(filePath)
|
||||
{
|
||||
UTIL_THROW_IF2(m_expandableDottedRuleListVec.size() != 0,
|
||||
"Dotted rule collection not correctly initialized");
|
||||
|
@ -41,8 +41,7 @@ public:
|
||||
const PhraseDictionaryOnDisk &dictionary,
|
||||
OnDiskPt::OnDiskWrapper &dbWrapper,
|
||||
const std::vector<FactorType> &inputFactorsVec,
|
||||
const std::vector<FactorType> &outputFactorsVec,
|
||||
const std::string &filePath);
|
||||
const std::vector<FactorType> &outputFactorsVec);
|
||||
|
||||
~ChartRuleLookupManagerOnDisk();
|
||||
|
||||
@ -55,7 +54,6 @@ private:
|
||||
OnDiskPt::OnDiskWrapper &m_dbWrapper;
|
||||
const std::vector<FactorType> &m_inputFactorsVec;
|
||||
const std::vector<FactorType> &m_outputFactorsVec;
|
||||
const std::string &m_filePath;
|
||||
std::vector<DottedRuleStackOnDisk*> m_expandableDottedRuleListVec;
|
||||
std::map<UINT64, const TargetPhraseCollection*> m_cache;
|
||||
std::list<const OnDiskPt::PhraseNode*> m_sourcePhraseNode;
|
||||
|
@ -59,7 +59,7 @@ ChartRuleLookupManager *PhraseDictionaryOnDisk::CreateRuleLookupManager(
|
||||
return new ChartRuleLookupManagerOnDisk(parser, cellCollection, *this,
|
||||
GetImplementation(),
|
||||
m_input,
|
||||
m_output, m_filePath);
|
||||
m_output);
|
||||
}
|
||||
|
||||
OnDiskPt::OnDiskWrapper &PhraseDictionaryOnDisk::GetImplementation()
|
||||
|
@ -38,7 +38,6 @@ PhraseOrientation::PhraseOrientation(int sourceSize,
|
||||
const Alignment &alignment)
|
||||
: m_countF(sourceSize)
|
||||
, m_countE(targetSize)
|
||||
, m_alignment(alignment)
|
||||
{
|
||||
|
||||
// prepare data structures for alignments
|
||||
|
@ -82,7 +82,6 @@ private:
|
||||
|
||||
const int m_countF;
|
||||
const int m_countE;
|
||||
const Alignment &m_alignment;
|
||||
|
||||
std::vector<std::vector<int> > m_alignedToT;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user