mirror of https://github.com/libAthena/athena.git
Allow atdna to handle multidimensional arrays
This commit is contained in:
parent
61bfac431e
commit
d2dbd99ad6
|
@ -435,7 +435,7 @@ class ATDNAEmitVisitor : public clang::RecursiveASTVisitor<ATDNAEmitVisitor>
|
||||||
regType = regType->getUnqualifiedDesugaredType();
|
regType = regType->getUnqualifiedDesugaredType();
|
||||||
|
|
||||||
/* Resolve constant array */
|
/* Resolve constant array */
|
||||||
if (regType->getTypeClass() == clang::Type::ConstantArray)
|
while (regType->getTypeClass() == clang::Type::ConstantArray)
|
||||||
{
|
{
|
||||||
const clang::ConstantArrayType* caType = (clang::ConstantArrayType*)regType;
|
const clang::ConstantArrayType* caType = (clang::ConstantArrayType*)regType;
|
||||||
qualType = caType->getElementType();
|
qualType = caType->getElementType();
|
||||||
|
@ -913,7 +913,7 @@ class ATDNAEmitVisitor : public clang::RecursiveASTVisitor<ATDNAEmitVisitor>
|
||||||
regType = regType->getUnqualifiedDesugaredType();
|
regType = regType->getUnqualifiedDesugaredType();
|
||||||
|
|
||||||
/* Resolve constant array */
|
/* Resolve constant array */
|
||||||
if (regType->getTypeClass() == clang::Type::ConstantArray)
|
while (regType->getTypeClass() == clang::Type::ConstantArray)
|
||||||
{
|
{
|
||||||
const clang::ConstantArrayType* caType = (clang::ConstantArrayType*)regType;
|
const clang::ConstantArrayType* caType = (clang::ConstantArrayType*)regType;
|
||||||
qualType = caType->getElementType();
|
qualType = caType->getElementType();
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
namespace athena::utility
|
namespace athena::utility
|
||||||
{
|
{
|
||||||
inline bool isEmpty(atInt8* buf, atUint32 size) {return !memcmp(buf, buf + 1, size - 1);}
|
inline bool isEmpty(atInt8* buf, atUint32 size) {return !memcmp(buf, buf + 1, size - 1);}
|
||||||
inline bool isSystemBigEndian() {return (*(atUint16*)"\xFE\xFF" == 0xFEFF);}
|
constexpr bool isSystemBigEndian() {return __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__;}
|
||||||
|
|
||||||
inline atInt16 swap16(atInt16 val)
|
inline atInt16 swap16(atInt16 val)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue