Attempt to fix operator [] return type issue.

git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/branches/mira-mtm5@3469 1f5c12ca-751b-0410-a591-d2e778427230
This commit is contained in:
ales-t 2010-09-15 16:09:55 +00:00
parent f1515e5dac
commit 45261017f4
3 changed files with 3 additions and 3 deletions

View File

@ -163,7 +163,7 @@ namespace Moses {
}
FValue &FVector::operator[](const FName& name) const {
FValue FVector::operator[](const FName& name) const {
return get(name) + get(DEFAULT_NAME);
}

View File

@ -136,7 +136,7 @@ namespace Moses {
/** Element access */
ProxyFVector operator[](const FName& name);
FValue &operator[](const FName& name) const;
FValue operator[](const FName& name) const;
/** Size */
size_t size() const {return m_features.size();}

View File

@ -71,7 +71,7 @@ public:
{}
inline size_t size() const { return m_scores.size(); }
const float& operator[](size_t x) const { return m_scores[m_sim->GetFeatureName(x)]; }
float operator[](size_t x) const { return m_scores[m_sim->GetFeatureName(x)]; }
//! Set all values to 0.0
void ZeroAll()