am 229f354f: Merge "Make members of classes that are used with std::vector const"

* commit '229f354fdc2ff98dd6b1132ef5a5bd364c065079':
  Make members of classes that are used with std::vector const
main
Keisuke Kuroyanagi 2014-10-10 06:29:29 +00:00 committed by Android Git Automerger
commit 8473800f40
3 changed files with 19 additions and 21 deletions

View File

@ -47,12 +47,12 @@ class HistoricalInfo {
}
private:
// Default copy constructor and assign operator are used for using in std::vector.
// Default copy constructor is used for using in std::vector.
DISALLOW_ASSIGNMENT_OPERATOR(HistoricalInfo);
// TODO: Make members const.
int mTimestamp;
int mLevel;
int mCount;
const int mTimestamp;
const int mLevel;
const int mCount;
};
} // namespace latinime
#endif /* LATINIME_HISTORICAL_INFO_H */

View File

@ -44,13 +44,13 @@ class NgramProperty {
}
private:
// Default copy constructor and assign operator are used for using in std::vector.
// Default copy constructor is used for using in std::vector.
DISALLOW_DEFAULT_CONSTRUCTOR(NgramProperty);
DISALLOW_ASSIGNMENT_OPERATOR(NgramProperty);
// TODO: Make members const.
std::vector<int> mTargetCodePoints;
int mProbability;
HistoricalInfo mHistoricalInfo;
const std::vector<int> mTargetCodePoints;
const int mProbability;
const HistoricalInfo mHistoricalInfo;
};
} // namespace latinime
#endif // LATINIME_NGRAM_PROPERTY_H

View File

@ -41,12 +41,11 @@ class UnigramProperty {
}
private:
// Default copy constructor and assign operator are used for using in std::vector.
// Default copy constructor is used for using in std::vector.
DISALLOW_DEFAULT_CONSTRUCTOR(ShortcutProperty);
// TODO: Make members const.
std::vector<int> mTargetCodePoints;
int mProbability;
const std::vector<int> mTargetCodePoints;
const int mProbability;
};
UnigramProperty()
@ -104,13 +103,12 @@ class UnigramProperty {
// Default copy constructor is used for using as a return value.
DISALLOW_ASSIGNMENT_OPERATOR(UnigramProperty);
// TODO: Make members const.
bool mRepresentsBeginningOfSentence;
bool mIsNotAWord;
bool mIsBlacklisted;
int mProbability;
HistoricalInfo mHistoricalInfo;
std::vector<ShortcutProperty> mShortcuts;
const bool mRepresentsBeginningOfSentence;
const bool mIsNotAWord;
const bool mIsBlacklisted;
const int mProbability;
const HistoricalInfo mHistoricalInfo;
const std::vector<ShortcutProperty> mShortcuts;
};
} // namespace latinime
#endif // LATINIME_UNIGRAM_PROPERTY_H