Mercurial > vim
comparison src/syntax.c @ 27028:c9474ae175f4 v8.2.4043
patch 8.2.4043: using int for second argument of ga_init2()
Commit: https://github.com/vim/vim/commit/04935fb17e5f0f66b82cf4546b9752d3d1fa650e
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jan 8 16:19:22 2022 +0000
patch 8.2.4043: using int for second argument of ga_init2()
Problem: Using int for second argument of ga_init2().
Solution: Remove unnessary type cast (int) when using sizeof().
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 08 Jan 2022 17:30:04 +0100 |
parents | ac75c145f0a9 |
children | 0ea5147a95f7 |
comparison
equal
deleted
inserted
replaced
27027:167e35b85720 | 27028:c9474ae175f4 |
---|---|
1412 sp->sst_stacksize = current_state.ga_len; | 1412 sp->sst_stacksize = current_state.ga_len; |
1413 if (current_state.ga_len > SST_FIX_STATES) | 1413 if (current_state.ga_len > SST_FIX_STATES) |
1414 { | 1414 { |
1415 // Need to clear it, might be something remaining from when the | 1415 // Need to clear it, might be something remaining from when the |
1416 // length was less than SST_FIX_STATES. | 1416 // length was less than SST_FIX_STATES. |
1417 ga_init2(&sp->sst_union.sst_ga, (int)sizeof(bufstate_T), 1); | 1417 ga_init2(&sp->sst_union.sst_ga, sizeof(bufstate_T), 1); |
1418 if (ga_grow(&sp->sst_union.sst_ga, current_state.ga_len) == FAIL) | 1418 if (ga_grow(&sp->sst_union.sst_ga, current_state.ga_len) == FAIL) |
1419 sp->sst_stacksize = 0; | 1419 sp->sst_stacksize = 0; |
1420 else | 1420 else |
1421 sp->sst_union.sst_ga.ga_len = current_state.ga_len; | 1421 sp->sst_union.sst_ga.ga_len = current_state.ga_len; |
1422 bp = SYN_STATE_P(&(sp->sst_union.sst_ga)); | 1422 bp = SYN_STATE_P(&(sp->sst_union.sst_ga)); |
1831 && (syn_block->b_keywtab.ht_used > 0 | 1831 && (syn_block->b_keywtab.ht_used > 0 |
1832 || syn_block->b_keywtab_ic.ht_used > 0); | 1832 || syn_block->b_keywtab_ic.ht_used > 0); |
1833 | 1833 |
1834 // Init the list of zero-width matches with a nextlist. This is used to | 1834 // Init the list of zero-width matches with a nextlist. This is used to |
1835 // avoid matching the same item in the same position twice. | 1835 // avoid matching the same item in the same position twice. |
1836 ga_init2(&zero_width_next_ga, (int)sizeof(int), 10); | 1836 ga_init2(&zero_width_next_ga, sizeof(int), 10); |
1837 | 1837 |
1838 // use syntax iskeyword option | 1838 // use syntax iskeyword option |
1839 save_chartab(buf_chartab); | 1839 save_chartab(buf_chartab); |
1840 | 1840 |
1841 /* | 1841 /* |