Skip to content

Commit

Permalink
compiler-calculated maximum value for m_SourceDefs (#966)
Browse files Browse the repository at this point in the history
removing the need to manually adjust the size when `TextType` is adjusted
  • Loading branch information
GitMensch authored Sep 13, 2021
1 parent 833fc61 commit 4478a7f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Externals/crystaledit/editlib/parsers/crystallineparser.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ struct TEXTBLOCK

typedef enum
{
SRC_PLAIN,
SRC_PLAIN = 0,
SRC_ASP,
SRC_AUTOIT,
SRC_BASIC,
Expand Down Expand Up @@ -108,7 +108,8 @@ typedef enum
SRC_TEX,
SRC_VERILOG,
SRC_VHDL,
SRC_XML
SRC_XML,
SRC_MAX_ENTRY /* always last entry, used for bound checking */
}
TextType;

Expand All @@ -129,7 +130,7 @@ struct TextDefinition
unsigned encoding;
};

extern TextDefinition m_SourceDefs[41];
extern TextDefinition m_SourceDefs[SRC_MAX_ENTRY];

bool IsXKeyword(const TCHAR *pszKey, size_t nKeyLen, const TCHAR *pszKeywordList[], size_t nKeywordListCount, int(*compare)(const TCHAR *, const TCHAR *, size_t));
bool IsXNumber(const TCHAR* pszChars, int nLength);
Expand Down

0 comments on commit 4478a7f

Please sign in to comment.