Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHieu Hoang <hieuhoang@gmail.com>2014-11-27 20:49:08 +0300
committerHieu Hoang <hieuhoang@gmail.com>2014-11-27 20:49:08 +0300
commitb70c34a083ab6a00fc071d40889e0cd9fb81a7b0 (patch)
treef110af5b3595dfce9d38d6eed14c8edce4f981d3 /moses/Util.h
parent604208964a6339c93e8c90614ad364ede535c83b (diff)
make GetParam() a const method with no side effect
Diffstat (limited to 'moses/Util.h')
-rw-r--r--moses/Util.h18
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);