aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval/typval_encode.h
diff options
context:
space:
mode:
authordundargoc <gocdundar@gmail.com>2023-11-10 12:23:42 +0100
committerdundargoc <33953936+dundargoc@users.noreply.github.com>2023-11-12 22:01:28 +0100
commit4f8941c1a5f1ef6caa410feeb52e343db22763ce (patch)
tree6e801079d088533198d526cb9aac8eb7981dc568 /src/nvim/eval/typval_encode.h
parent353a4be7e84fdc101318215bdcc8a7e780d737fe (diff)
downloadrneovim-4f8941c1a5f1ef6caa410feeb52e343db22763ce.tar.gz
rneovim-4f8941c1a5f1ef6caa410feeb52e343db22763ce.tar.bz2
rneovim-4f8941c1a5f1ef6caa410feeb52e343db22763ce.zip
refactor: replace manual header guards with #pragma once
It is less error-prone than manually defining header guards. Pretty much all compilers support it even if it's not part of the C standard.
Diffstat (limited to 'src/nvim/eval/typval_encode.h')
-rw-r--r--src/nvim/eval/typval_encode.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/nvim/eval/typval_encode.h b/src/nvim/eval/typval_encode.h
index cf01926030..743acd8800 100644
--- a/src/nvim/eval/typval_encode.h
+++ b/src/nvim/eval/typval_encode.h
@@ -2,8 +2,7 @@
///
/// Contains common definitions for eval/typval_encode.c.h. Most of time should
/// not be included directly.
-#ifndef NVIM_EVAL_TYPVAL_ENCODE_H
-#define NVIM_EVAL_TYPVAL_ENCODE_H
+#pragma once
#include <assert.h>
#include <inttypes.h>
@@ -140,5 +139,3 @@ static inline size_t tv_strlen(const typval_T *const tv)
/// Name of the dummy const dict_T *const variable
#define TYPVAL_ENCODE_NODICT_VAR \
_TYPVAL_ENCODE_FUNC_NAME(_typval_encode_, _nodict_var)
-
-#endif // NVIM_EVAL_TYPVAL_ENCODE_H