diff options
author | ZyX <kp-pav@yandex.ru> | 2016-06-24 17:16:11 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2016-06-24 17:16:11 +0300 |
commit | 458a4d04447e57c198210fb8f743a261e13b9855 (patch) | |
tree | ec80df8e529341884fbeaea64c86fbbfaf87bc38 /src/nvim/api/private/helpers.c | |
parent | 50f5bb8ade138a1a7a67838f01b7edb2f7396b92 (diff) | |
download | rneovim-458a4d04447e57c198210fb8f743a261e13b9855.tar.gz rneovim-458a4d04447e57c198210fb8f743a261e13b9855.tar.bz2 rneovim-458a4d04447e57c198210fb8f743a261e13b9855.zip |
*: Fix linter errors
Also adds one exception to linter rules:
typedef struct {
kvec_t(Object) stack;
} EncodedData;
is completely valid (from the style guide point of view) code.
Diffstat (limited to 'src/nvim/api/private/helpers.c')
-rw-r--r-- | src/nvim/api/private/helpers.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/nvim/api/private/helpers.c b/src/nvim/api/private/helpers.c index 0d527b0629..c88bf2127a 100644 --- a/src/nvim/api/private/helpers.c +++ b/src/nvim/api/private/helpers.c @@ -323,20 +323,20 @@ void set_option_to(void *to, int type, String name, Object value, Error *err) kv_push(edata->stack, NIL) #define TYPVAL_ENCODE_CONV_BOOL(num) \ - kv_push(edata->stack, BOOLEAN_OBJ((Boolean) (num))) + kv_push(edata->stack, BOOLEAN_OBJ((Boolean)(num))) #define TYPVAL_ENCODE_CONV_NUMBER(num) \ - kv_push(edata->stack, INTEGER_OBJ((Integer) (num))) + kv_push(edata->stack, INTEGER_OBJ((Integer)(num))) #define TYPVAL_ENCODE_CONV_UNSIGNED_NUMBER TYPVAL_ENCODE_CONV_NUMBER #define TYPVAL_ENCODE_CONV_FLOAT(flt) \ - kv_push(edata->stack, FLOATING_OBJ((Float) (flt))) + kv_push(edata->stack, FLOATING_OBJ((Float)(flt))) #define TYPVAL_ENCODE_CONV_STRING(str, len) \ do { \ - const size_t len_ = (size_t) (len); \ - const char *const str_ = (const char *) (str); \ + const size_t len_ = (size_t)(len); \ + const char *const str_ = (const char *)(str); \ assert(len_ == 0 || str_ != NULL); \ kv_push(edata->stack, STRING_OBJ(((String) { \ .data = xmemdupz((len_?str_:""), len_), \ @@ -372,7 +372,7 @@ static inline void typval_encode_list_start(EncodedData *const edata, } #define TYPVAL_ENCODE_CONV_LIST_START(len) \ - typval_encode_list_start(edata, (size_t) (len)) + typval_encode_list_start(edata, (size_t)(len)) static inline void typval_encode_between_list_items(EncodedData *const edata) FUNC_ATTR_ALWAYS_INLINE FUNC_ATTR_NONNULL_ALL @@ -413,7 +413,7 @@ static inline void typval_encode_dict_start(EncodedData *const edata, } #define TYPVAL_ENCODE_CONV_DICT_START(len) \ - typval_encode_dict_start(edata, (size_t) (len)) + typval_encode_dict_start(edata, (size_t)(len)) #define TYPVAL_ENCODE_CONV_SPECIAL_DICT_KEY_CHECK(label, kv_pair) |