Renamee IOPort 2 functions to original

This commit is contained in:
Jaby
2023-09-24 11:52:18 +02:00
committed by Jaby
parent cce55dd24c
commit b603cefca0
9 changed files with 22 additions and 22 deletions

View File

@@ -22,15 +22,15 @@ namespace JabyEngine {
template<typename...ARGS>
static constexpr T from(const ARGS&...args) {
return T{0}.set2(args...);
return T{0}.set(args...);
}
constexpr T& set2(Bit bit) {
constexpr T& set(Bit bit) {
this->raw = bit::set(this->raw, bit);
return static_cast<T&>(*this);
}
constexpr T& set2(ClearBit bit) {
constexpr T& set(ClearBit bit) {
this->raw = bit::set(this->raw, bit);
return static_cast<T&>(*this);
}
@@ -41,26 +41,26 @@ namespace JabyEngine {
}
template<typename U>
constexpr T& set2(const BitRange::RangeValuePair<U>& value) {
constexpr T& set(const BitRange::RangeValuePair<U>& value) {
this->raw = bit::value::set_normalized(this->raw, value);
return static_cast<T&>(*this);
}
template<typename U, typename...ARGS>
constexpr T& set2(const U& head, const ARGS&...tail) {
return this->set2(head).set2(tail...);
constexpr T& set(const U& head, const ARGS&...tail) {
return this->set(head).set(tail...);
}
constexpr IOValue<T, S>::UnderlyingType get2(BitRange bits) const {
constexpr IOValue<T, S>::UnderlyingType get(BitRange bits) const {
return bit::value::get_normalized(this->raw, bits.pos, bits.length);
}
constexpr T& clear2(Bit bit) {
constexpr T& clear(Bit bit) {
this->raw = bit::clear(this->raw, bit);
return static_cast<T&>(*this);
}
constexpr bool is_set2(Bit bit) const {
constexpr bool is_set(Bit bit) const {
return bit::is_set(this->raw, bit);
}
};