Integrate all the progress into master #6

Merged
jaby merged 595 commits from ToolBox into main 2025-01-01 13:17:44 +00:00
1 changed files with 3 additions and 2 deletions
Showing only changes of commit 628fb89771 - Show all commits

View File

@ -77,13 +77,14 @@ namespace JabyEngine {
template<typename T>
struct IOPort {
using Value = T;
T value;
T read() const {
return {const_cast<const volatile Value*>(reinterpret_cast<const Value*>(this))->raw};
return {const_cast<const volatile IOPort<T>*>(this)->value.raw};
}
void write(T value) {
const_cast<volatile Value*>(reinterpret_cast<Value*>(this))->raw = value.raw;
const_cast<volatile IOPort<T>*>(this)->value.raw = value.raw;
}
};