diff options
author | ii14 <59243201+ii14@users.noreply.github.com> | 2023-04-06 22:39:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-06 22:39:50 +0200 |
commit | 7190dba017e3aac0409c73ff1c954d18858cb3c9 (patch) | |
tree | 321f4b2dd65e4a06047beee876d3c2e0d2dbf7d0 /src/nvim/mbyte.c | |
parent | 0bc323850410df4c3c1dd8fabded9d2000189270 (diff) | |
download | rneovim-7190dba017e3aac0409c73ff1c954d18858cb3c9.tar.gz rneovim-7190dba017e3aac0409c73ff1c954d18858cb3c9.tar.bz2 rneovim-7190dba017e3aac0409c73ff1c954d18858cb3c9.zip |
refactor: remove use of reserved c++ keywords
libnvim couldn't be easily used in C++ due to the use of reserved keywords.
Additionally, add explicit casts to *alloc function calls used in inline
functions, as C++ doesn't allow implicit casts from void pointers.
Diffstat (limited to 'src/nvim/mbyte.c')
-rw-r--r-- | src/nvim/mbyte.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/mbyte.c b/src/nvim/mbyte.c index 340a05f29d..6ab7aee29d 100644 --- a/src/nvim/mbyte.c +++ b/src/nvim/mbyte.c @@ -1053,7 +1053,7 @@ int utf_class_tab(const int c, const uint64_t *const chartab) static struct clinterval { unsigned int first; unsigned int last; - unsigned int class; + unsigned int cls; } classes[] = { { 0x037e, 0x037e, 1 }, // Greek question mark { 0x0387, 0x0387, 1 }, // Greek ano teleia @@ -1154,7 +1154,7 @@ int utf_class_tab(const int c, const uint64_t *const chartab) } else if (classes[mid].first > (unsigned int)c) { top = mid - 1; } else { - return (int)classes[mid].class; + return (int)classes[mid].cls; } } |