Squashed 'deps/ox/' changes from c63e0c1..bf5c4e2
bf5c4e2 Add missing optype.hpp file fdcc303 Removed unused CMake file 4e1f304 Fix version mismatch when loading FileSystems 565c56e Increment FileStore version for inode ID size change 64543b7 Bump FileStore32's InodeId type to uint16_t fe062cf Add methods for getting array and string length of Metal Claw fields 8deae14 Add general ioOp that will call ioOpRead or ioOpWrite 009cf99 Add OpType for Metal Claw operators 1cf6164 Remove array globals from OxStd, as they were causing section overlaps on GBA 3ffba29 Add op(const char*, (u)int8_t) methods to MetalClaw 489736d Add an optional sizeOut parameter to Metal Claw write 443a62c Fix ArrayLength type case in Metal Claw writer a46fc8b Add MetalClaw to OxConfig.cmake git-subtree-dir: deps/ox git-subtree-split: bf5c4e2c4712b83befff7da25147902408146dd7
This commit is contained in:
27
deps/ox/src/ox/mc/optype.hpp
vendored
Normal file
27
deps/ox/src/ox/mc/optype.hpp
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright 2015 - 2017 gtalent2@gmail.com
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace ox {
|
||||
|
||||
enum class OpType {
|
||||
Read = 0,
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user