Port TimerIO
This commit is contained in:
@@ -14,7 +14,7 @@ namespace JabyEngine {
|
||||
|
||||
template<typename...ARGS>
|
||||
static constexpr T from(const ARGS&...args) {
|
||||
return T{0}.set_va(args...);
|
||||
return T{0}.set2(args...);
|
||||
}
|
||||
|
||||
constexpr T& set2(Bit bit) {
|
||||
@@ -27,7 +27,7 @@ namespace JabyEngine {
|
||||
return static_cast<T&>(*this);
|
||||
}
|
||||
|
||||
constexpr T& set2(BitRange bits, T value) {
|
||||
constexpr T& set_range(const BitRange& bits, UnderlyingType value) {
|
||||
this->raw = bit::value::set_normalized(this->raw, bits, value);
|
||||
return static_cast<T&>(*this);
|
||||
}
|
||||
@@ -37,26 +37,10 @@ namespace JabyEngine {
|
||||
this->raw = bit::value::set_normalized(this->raw, value);
|
||||
return static_cast<T&>(*this);
|
||||
}
|
||||
|
||||
template<typename U>
|
||||
constexpr T& set2(const U& first) {
|
||||
return IOValue<T, S>::set2(first);
|
||||
}
|
||||
|
||||
template<typename U, typename...ARGS>
|
||||
constexpr T& set2(const U& first, const ARGS& ...args) {
|
||||
IOValue<T, S>::set2(first);
|
||||
return IOValue<T, S>::set2(args...);
|
||||
}
|
||||
|
||||
template<typename U>
|
||||
constexpr T& set_va(const U& head) {
|
||||
return this->set2(head);
|
||||
}
|
||||
|
||||
template<typename U, typename...ARGS>
|
||||
constexpr T& set_va(const U& head, const ARGS&...tail) {
|
||||
return this->set2(head).set_va(tail...);
|
||||
constexpr T& set2(const U& head, const ARGS&...tail) {
|
||||
return this->set2(head).set2(tail...);
|
||||
}
|
||||
|
||||
constexpr IOValue<T, S>::UnderlyingType get2(BitRange bits) const {
|
||||
|
||||
Reference in New Issue
Block a user