Commit e43b56eb authored by Max Kellermann's avatar Max Kellermann

Chrono: add template parameter to ToScale()

parent 0c2d767f
...@@ -57,9 +57,9 @@ public: ...@@ -57,9 +57,9 @@ public:
return count(); return count();
} }
constexpr unsigned ToScale(unsigned base) const { template<typename T=rep>
// TODO: case to 64 bit to avoid integer overflow? constexpr T ToScale(unsigned base) const {
return count() * base / 1000; return count() * T(base) / 1000;
} }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment