• R/O
  • HTTP
  • SSH
  • HTTPS

winmerge-jp: Commit


Commit MetaInfo

Revision4478a7f10eac5af91142e513174a127abcaba572 (tree)
Time2021-09-13 19:08:18
AuthorSimon Sobisch <simonsobisch@web....>
CommiterGitHub

Log Message

compiler-calculated maximum value for m_SourceDefs (#966)

removing the need to manually adjust the size when TextType is adjusted

Change Summary

Incremental Difference

--- a/Externals/crystaledit/editlib/parsers/crystallineparser.h
+++ b/Externals/crystaledit/editlib/parsers/crystallineparser.h
@@ -68,7 +68,7 @@ struct TEXTBLOCK
6868
6969 typedef enum
7070 {
71- SRC_PLAIN,
71+ SRC_PLAIN = 0,
7272 SRC_ASP,
7373 SRC_AUTOIT,
7474 SRC_BASIC,
@@ -108,7 +108,8 @@ typedef enum
108108 SRC_TEX,
109109 SRC_VERILOG,
110110 SRC_VHDL,
111- SRC_XML
111+ SRC_XML,
112+ SRC_MAX_ENTRY /* always last entry, used for bound checking */
112113 }
113114 TextType;
114115
@@ -129,7 +130,7 @@ struct TextDefinition
129130 unsigned encoding;
130131 };
131132
132-extern TextDefinition m_SourceDefs[41];
133+extern TextDefinition m_SourceDefs[SRC_MAX_ENTRY];
133134
134135 bool IsXKeyword(const TCHAR *pszKey, size_t nKeyLen, const TCHAR *pszKeywordList[], size_t nKeywordListCount, int(*compare)(const TCHAR *, const TCHAR *, size_t));
135136 bool IsXNumber(const TCHAR* pszChars, int nLength);
Show on old repository browser