fixed: dont scale inputs in from_native calls

This commit is contained in:
Danny Robson 2015-02-06 19:01:06 +11:00
parent 6fee487bc0
commit 1d2d32e016
2 changed files with 5 additions and 1 deletions

View File

@ -81,7 +81,9 @@ template <unsigned I, unsigned E>
fixed<I,E>
fixed<I,E>::from_native (uint_t i)
{
return fixed<I,E> {i};
fixed<I,E> v;
v.m_value = i;
return v;
}

View File

@ -64,6 +64,8 @@ namespace util {
fixed<I,E> operator /(uint_t) const;
private:
fixed () = default;
uint_t m_value;
};