Skip to content

Commit

Permalink
ensure everything is static asserted
Browse files Browse the repository at this point in the history
  • Loading branch information
shenlebantongying committed Sep 25, 2024
1 parent 7af1757 commit 4082e79
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/dict/sdict.cc
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,15 @@ struct DCT_header
uint32_t fullIndexOffset;
uint32_t articlesOffset;
};
static_assert( alignof( DCT_header ) == 1 );

struct IndexElement
{
uint16_t nextWord;
uint16_t previousWord;
uint32_t articleOffset;
};
static_assert( alignof( IndexElement ) == 1 );

enum {
Signature = 0x43494453, // SDIC on little-endian, CIDS on big-endian
Expand Down

0 comments on commit 4082e79

Please sign in to comment.