diff options
author | Hieu Hoang <hieuhoang@gmail.com> | 2014-11-27 20:49:08 +0300 |
---|---|---|
committer | Hieu Hoang <hieuhoang@gmail.com> | 2014-11-27 20:49:08 +0300 |
commit | b70c34a083ab6a00fc071d40889e0cd9fb81a7b0 (patch) | |
tree | f110af5b3595dfce9d38d6eed14c8edce4f981d3 /moses/Util.h | |
parent | 604208964a6339c93e8c90614ad364ede535c83b (diff) |
make GetParam() a const method with no side effect
Diffstat (limited to 'moses/Util.h')
-rw-r--r-- | moses/Util.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/moses/Util.h b/moses/Util.h index acaa4b53c..0e3ead4e1 100644 --- a/moses/Util.h +++ b/moses/Util.h @@ -102,6 +102,24 @@ inline std::string Scan<std::string>(const std::string &input) return input; } +template<> +inline WordAlignmentSort Scan<WordAlignmentSort>(const std::string &input) +{ + return (WordAlignmentSort) Scan<size_t>(input); +} + +template<> +inline InputTypeEnum Scan<InputTypeEnum>(const std::string &input) +{ + return (InputTypeEnum) Scan<size_t>(input); +} + +template<> +inline SearchAlgorithm Scan<SearchAlgorithm>(const std::string &input) +{ + return (SearchAlgorithm) Scan<size_t>(input); +} + //! Specialisation to understand yes/no y/n true/false 0/1 template<> bool Scan<bool>(const std::string &input); |