[ox] Get building with devkitARM again

This commit is contained in:
Gary Talent 2019-03-18 00:19:04 -05:00
parent 22da505869
commit b33cd06031
6 changed files with 18 additions and 11 deletions

View File

@ -6,7 +6,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#if __has_include(<filesystem>)
#if __has_include(<filesystem>) && defined(OX_USE_STDLIB)
#include <stdio.h>

View File

@ -54,6 +54,11 @@ struct McInt {
std::size_t length = 0;
};
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wcast-align"
#endif
template<typename I>
[[nodiscard]] McInt encodeInteger(I input) noexcept {
McInt out;
@ -144,6 +149,10 @@ template<typename I>
return {0, OxError(1)};
}
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif
template<typename I>
[[nodiscard]] ValErr<I> decodeInteger(McInt m) noexcept {
std::size_t bytesRead;

View File

@ -112,7 +112,7 @@ Error MetalClawReader::field(const char*, T *val) {
err |= model(&reader, val);
}
return err;
};
}
template<std::size_t L>
Error MetalClawReader::field(const char *name, ox::BString<L> *val) {
@ -134,7 +134,7 @@ Error MetalClawReader::readInteger(I *val) {
*val = 0;
}
return OxError(0);
};
}
// array handler
template<typename T>
@ -162,7 +162,7 @@ Error MetalClawReader::field(const char*, T *val, std::size_t valLen) {
}
}
return err;
};
}
template<typename T>
Error MetalClawReader::field(const char*, ox::Vector<T> *val) {

View File

@ -27,12 +27,6 @@ static_assert([] {
return indirectionLevels(i) == 1;
}(), "indirectionLevels broken: indirectionLevels(int[])");
static_assert([] {
int i[2][2] = {{}};
return indirectionLevels(i) == 2;
}(), "indirectionLevels broken: indirectionLevels(int[][])");
TypeDescWriter::TypeDescWriter(TypeStore *typeStore) {
if (!typeStore) {
m_typeStoreOwnerRef = new TypeStore;

View File

@ -8,8 +8,10 @@
namespace ox::buildinfo {
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-const-variable"
#endif
#if defined(OX_USE_STDLIB)
const bool UseStdLib = true;
@ -37,6 +39,8 @@ const bool BigEndian = false;
const bool LittleEndian = true;
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
}

View File

@ -174,7 +174,7 @@ const T &Vector<T>::back() const noexcept {
template<typename T>
std::size_t Vector<T>::size() const noexcept {
return m_size;
};
}
template<typename T>
void Vector<T>::resize(std::size_t size) noexcept {