1
0
mirror of https://github.com/TomHarte/CLK.git synced 2026-04-21 17:16:44 +00:00

Switch to get/as.

This commit is contained in:
Thomas Harte
2026-03-06 15:44:22 -05:00
parent 4e680b1191
commit 186b911e8e
46 changed files with 98 additions and 98 deletions
+4 -4
View File
@@ -164,7 +164,7 @@ public:
if constexpr (divider == 1) {
return time_since_update_;
}
return TargetTimeScale(time_since_update_.as_integral() / divider);
return TargetTimeScale(time_since_update_.get() / divider);
}
/// @returns the amount of time since the object was last flushed, plus the local time scale @c offset,
@@ -173,7 +173,7 @@ public:
if constexpr (divider == 1) {
return time_since_update_ + offset;
}
return TargetTimeScale((time_since_update_ + offset).as_integral() / divider);
return TargetTimeScale((time_since_update_ + offset).get() / divider);
}
/// Flushes all accumulated time.
@@ -238,8 +238,8 @@ public:
// Figure out the number of whole input steps that is required to get
// past target, and subtract the number of whole input steps necessary
// to get to base.
const auto steps_to_base = base.as_integral() / multiplier;
const auto steps_to_target = (target.as_integral() + divider - 1) / multiplier;
const auto steps_to_base = base.get() / multiplier;
const auto steps_to_target = (target.get() + divider - 1) / multiplier;
return LocalTimeScale(steps_to_target - steps_to_base);
}