diff options
Diffstat (limited to 'machxo2/arch.h')
-rw-r--r-- | machxo2/arch.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/machxo2/arch.h b/machxo2/arch.h index 7a22dd91..15535fe1 100644 --- a/machxo2/arch.h +++ b/machxo2/arch.h @@ -18,9 +18,14 @@ * */ -#ifndef NEXTPNR_H -#error Include "arch.h" via "nextpnr.h" only. -#endif +#ifndef MACHXO2_ARCH_H +#define MACHXO2_ARCH_H + +#include <cstdint> + +#include "base_arch.h" +#include "nextpnr_namespaces.h" +#include "nextpnr_types.h" NEXTPNR_NAMESPACE_BEGIN @@ -37,7 +42,7 @@ template <typename T> struct RelPtr const T *get() const { return reinterpret_cast<const T *>(reinterpret_cast<const char *>(this) + offset); } - const T &operator[](size_t index) const { return get()[index]; } + const T &operator[](std::size_t index) const { return get()[index]; } const T &operator*() const { return *(get()); } @@ -684,3 +689,5 @@ struct Arch : BaseArch<ArchRanges> }; NEXTPNR_NAMESPACE_END + +#endif /* MACHXO2_ARCH_H */ |