1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-22 12:33:29 +00:00

Added an additional constructor to make sure that regular ints go to the correct place.

This commit is contained in:
Thomas Harte 2016-12-24 13:27:57 -05:00
parent 1e970a9772
commit 4728bda0a2

View File

@ -26,6 +26,7 @@ struct Time {
Time(unsigned int unsigned_int_value) : length(unsigned_int_value), clock_rate(1) {}
Time(int int_value) : Time((unsigned int)int_value) {}
Time(unsigned int length, unsigned int clock_rate) : length(length), clock_rate(clock_rate) {}
Time(int length, int clock_rate) : Time((unsigned int)length, (unsigned int)clock_rate) {}
Time(uint64_t length, uint64_t clock_rate)
{
install_result(length, clock_rate);