diff --git a/src/rime/dict/mapped_file.h b/src/rime/dict/mapped_file.h index 71a9fdcc42..a79a41d34e 100644 --- a/src/rime/dict/mapped_file.h +++ b/src/rime/dict/mapped_file.h @@ -131,11 +131,7 @@ class MappedFile : boost::noncopyable { // member function definitions -# if defined(__arm__) # define RIME_ALIGNED(size, T) ((size + alignof(T) - 1) & ~(alignof(T) - 1)) -# else -# define RIME_ALIGNED(size, T) (size) -# endif template T* MappedFile::Allocate(size_t count) { diff --git a/src/rime/dict/table.h b/src/rime/dict/table.h index c4d4e3a2fd..013ee61bf2 100644 --- a/src/rime/dict/table.h +++ b/src/rime/dict/table.h @@ -15,13 +15,13 @@ #include #include -#define RIME_TABLE_UNION(U, V, Ta, a, Tb, b) \ +#define RIME_TABLE_UNION(U, V, A, a, B, b) \ struct U { \ V value; \ - const Ta& a() const { return *reinterpret_cast(this); } \ - const Tb& b() const { return *reinterpret_cast(this); } \ - Ta& a() { return *reinterpret_cast(this); } \ - Tb& b() { return *reinterpret_cast(this); } \ + const A& a() const { return *reinterpret_cast(this); } \ + const B& b() const { return *reinterpret_cast(this); } \ + A& a() { return *reinterpret_cast(this); } \ + B& b() { return *reinterpret_cast(this); } \ } namespace rime { @@ -40,11 +40,7 @@ using Syllabary = Array; using Code = List; -#if defined(__arm__) using Weight = double; -#else -using Weight = float; -#endif struct Entry { StringType text; @@ -75,7 +71,7 @@ using TrunkIndex = Array; using TailIndex = Array; -//union Phraseindex { +//union PhraseIndex { // TrunkIndex trunk; // TailIndex tail; //};