Use stringstream operation instead of atoi and atof to prevent error and overflow

git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@2934 1f5c12ca-751b-0410-a591-d2e778427230
This commit is contained in:
jfouet 2010-02-24 10:03:22 +00:00
parent 50c22f1e42
commit 133f18bd90

View File

@ -76,20 +76,6 @@ inline T Scan(const std::string &input)
return ret;
}
//! Specialisation for performance
template<>
inline int Scan<int>(const std::string &input)
{
return atoi(input.c_str());
}
//! Specialisation for performance
template<>
inline float Scan<float>(const std::string &input)
{
return (float) atof(input.c_str());
}
//! just return input
template<>
inline std::string Scan<std::string>(const std::string &input)