diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-03-30 18:47:01 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-03-30 18:47:01 +0100 |
commit | abab0b0fdd6535969447b03a4fffc1947918cf6c (patch) | |
tree | 2d43537a5dce8433ef2b2a37684c9e069392c592 /src/macros.h | |
parent | bd9bf266fccbf7b7f09e476e09b61f0133e914db (diff) | |
download | vim-git-abab0b0fdd6535969447b03a4fffc1947918cf6c.tar.gz |
patch 8.1.1086: too many curly bracesv8.1.1086
Problem: Too many curly braces.
Solution: Remove curly braces where they are not needed. (Hirohito Higashi,
closes #3982)
Diffstat (limited to 'src/macros.h')
-rw-r--r-- | src/macros.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/macros.h b/src/macros.h index 510be9bda..571fed0a7 100644 --- a/src/macros.h +++ b/src/macros.h @@ -32,7 +32,7 @@ ? (a)->col < (b)->col \ : (a)->coladd < (b)->coladd) #define EQUAL_POS(a, b) (((a).lnum == (b).lnum) && ((a).col == (b).col) && ((a).coladd == (b).coladd)) -#define CLEAR_POS(a) {(a)->lnum = 0; (a)->col = 0; (a)->coladd = 0;} +#define CLEAR_POS(a) do {(a)->lnum = 0; (a)->col = 0; (a)->coladd = 0;} while (0) #define LTOREQ_POS(a, b) (LT_POS(a, b) || EQUAL_POS(a, b)) @@ -240,7 +240,7 @@ /* get length of multi-byte char, not including composing chars */ #define MB_CPTR2LEN(p) (enc_utf8 ? utf_ptr2len(p) : (*mb_ptr2len)(p)) -#define MB_COPY_CHAR(f, t) if (has_mbyte) mb_copy_char(&f, &t); else *t++ = *f++ +#define MB_COPY_CHAR(f, t) do { if (has_mbyte) mb_copy_char(&f, &t); else *t++ = *f++; } while (0) #define MB_CHARLEN(p) (has_mbyte ? mb_charlen(p) : (int)STRLEN(p)) #define MB_CHAR2LEN(c) (has_mbyte ? mb_char2len(c) : 1) #define PTR2CHAR(p) (has_mbyte ? mb_ptr2char(p) : (int)*(p)) @@ -251,7 +251,8 @@ # define DO_AUTOCHDIR do { /**/ } while (0) #endif -#define RESET_BINDING(wp) (wp)->w_p_scb = FALSE; (wp)->w_p_crb = FALSE +#define RESET_BINDING(wp) do { (wp)->w_p_scb = FALSE; (wp)->w_p_crb = FALSE; \ + } while (0) #ifdef FEAT_DIFF # define PLINES_NOFILL(x) plines_nofill(x) |