Add general ioOp that will call ioOpRead or ioOpWrite
This commit is contained in:
parent
70896b8761
commit
2ed10afef7
9
deps/ox/src/ox/mc/optype.hpp
vendored
9
deps/ox/src/ox/mc/optype.hpp
vendored
@ -15,4 +15,13 @@ enum class OpType {
|
||||
Write = 1
|
||||
};
|
||||
|
||||
template<typename T, typename O>
|
||||
ox::Error ioOp(T *io, O *obj) {
|
||||
if (io->opType() == ox::OpType::Read) {
|
||||
return ioOpRead(io, obj);
|
||||
} else {
|
||||
return ioOpWrite(io, obj);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user