diff options
author | dundargoc <gocdundar@gmail.com> | 2023-11-10 12:23:42 +0100 |
---|---|---|
committer | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-11-12 22:01:28 +0100 |
commit | 4f8941c1a5f1ef6caa410feeb52e343db22763ce (patch) | |
tree | 6e801079d088533198d526cb9aac8eb7981dc568 /src/nvim/lua | |
parent | 353a4be7e84fdc101318215bdcc8a7e780d737fe (diff) | |
download | rneovim-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/lua')
-rw-r--r-- | src/nvim/lua/base64.h | 5 | ||||
-rw-r--r-- | src/nvim/lua/converter.h | 4 | ||||
-rw-r--r-- | src/nvim/lua/executor.h | 5 | ||||
-rw-r--r-- | src/nvim/lua/secure.h | 5 | ||||
-rw-r--r-- | src/nvim/lua/spell.h | 5 | ||||
-rw-r--r-- | src/nvim/lua/stdlib.h | 5 | ||||
-rw-r--r-- | src/nvim/lua/treesitter.h | 5 | ||||
-rw-r--r-- | src/nvim/lua/xdiff.h | 5 |
8 files changed, 8 insertions, 31 deletions
diff --git a/src/nvim/lua/base64.h b/src/nvim/lua/base64.h index 570d9eb677..feb409ef38 100644 --- a/src/nvim/lua/base64.h +++ b/src/nvim/lua/base64.h @@ -1,5 +1,4 @@ -#ifndef NVIM_LUA_BASE64_H -#define NVIM_LUA_BASE64_H +#pragma once #include <lauxlib.h> #include <lua.h> @@ -8,5 +7,3 @@ #ifdef INCLUDE_GENERATED_DECLARATIONS # include "lua/base64.h.generated.h" #endif - -#endif // NVIM_LUA_BASE64_H diff --git a/src/nvim/lua/converter.h b/src/nvim/lua/converter.h index d1d6b9d62a..501db36dbe 100644 --- a/src/nvim/lua/converter.h +++ b/src/nvim/lua/converter.h @@ -1,5 +1,4 @@ -#ifndef NVIM_LUA_CONVERTER_H -#define NVIM_LUA_CONVERTER_H +#pragma once #include <lua.h> #include <stdbool.h> @@ -16,4 +15,3 @@ #ifdef INCLUDE_GENERATED_DECLARATIONS # include "lua/converter.h.generated.h" #endif -#endif // NVIM_LUA_CONVERTER_H diff --git a/src/nvim/lua/executor.h b/src/nvim/lua/executor.h index 4b4d1dded8..91775e0322 100644 --- a/src/nvim/lua/executor.h +++ b/src/nvim/lua/executor.h @@ -1,5 +1,4 @@ -#ifndef NVIM_LUA_EXECUTOR_H -#define NVIM_LUA_EXECUTOR_H +#pragma once #include <lauxlib.h> #include <lua.h> @@ -47,5 +46,3 @@ typedef struct { EXTERN nlua_ref_state_t *nlua_global_refs INIT( = NULL); EXTERN bool nlua_disable_preload INIT( = false); - -#endif // NVIM_LUA_EXECUTOR_H diff --git a/src/nvim/lua/secure.h b/src/nvim/lua/secure.h index 87c468538e..b363a243a5 100644 --- a/src/nvim/lua/secure.h +++ b/src/nvim/lua/secure.h @@ -1,5 +1,4 @@ -#ifndef NVIM_LUA_SECURE_H -#define NVIM_LUA_SECURE_H +#pragma once #include <lua.h> @@ -8,5 +7,3 @@ #ifdef INCLUDE_GENERATED_DECLARATIONS # include "lua/secure.h.generated.h" #endif - -#endif // NVIM_LUA_SECURE_H diff --git a/src/nvim/lua/spell.h b/src/nvim/lua/spell.h index 8f798a5191..adf3e9dd60 100644 --- a/src/nvim/lua/spell.h +++ b/src/nvim/lua/spell.h @@ -1,5 +1,4 @@ -#ifndef NVIM_LUA_SPELL_H -#define NVIM_LUA_SPELL_H +#pragma once #include <lauxlib.h> #include <lua.h> @@ -8,5 +7,3 @@ #ifdef INCLUDE_GENERATED_DECLARATIONS # include "lua/spell.h.generated.h" #endif - -#endif // NVIM_LUA_SPELL_H diff --git a/src/nvim/lua/stdlib.h b/src/nvim/lua/stdlib.h index 17aec6714d..b2be54af90 100644 --- a/src/nvim/lua/stdlib.h +++ b/src/nvim/lua/stdlib.h @@ -1,10 +1,7 @@ -#ifndef NVIM_LUA_STDLIB_H -#define NVIM_LUA_STDLIB_H +#pragma once #include <lua.h> #ifdef INCLUDE_GENERATED_DECLARATIONS # include "lua/stdlib.h.generated.h" #endif - -#endif // NVIM_LUA_STDLIB_H diff --git a/src/nvim/lua/treesitter.h b/src/nvim/lua/treesitter.h index b69fb9dfae..c1c78b8a6a 100644 --- a/src/nvim/lua/treesitter.h +++ b/src/nvim/lua/treesitter.h @@ -1,5 +1,4 @@ -#ifndef NVIM_LUA_TREESITTER_H -#define NVIM_LUA_TREESITTER_H +#pragma once #include <lauxlib.h> #include <lua.h> @@ -10,5 +9,3 @@ #ifdef INCLUDE_GENERATED_DECLARATIONS # include "lua/treesitter.h.generated.h" #endif - -#endif // NVIM_LUA_TREESITTER_H diff --git a/src/nvim/lua/xdiff.h b/src/nvim/lua/xdiff.h index b172d2f922..9cb5cabbfb 100644 --- a/src/nvim/lua/xdiff.h +++ b/src/nvim/lua/xdiff.h @@ -1,5 +1,4 @@ -#ifndef NVIM_LUA_XDIFF_H -#define NVIM_LUA_XDIFF_H +#pragma once #include <lauxlib.h> #include <lua.h> @@ -8,5 +7,3 @@ #ifdef INCLUDE_GENERATED_DECLARATIONS # include "lua/xdiff.h.generated.h" #endif - -#endif // NVIM_LUA_XDIFF_H |