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/api/private | |
| 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/api/private')
| -rw-r--r-- | src/nvim/api/private/converter.h | 5 | ||||
| -rw-r--r-- | src/nvim/api/private/defs.h | 5 | ||||
| -rw-r--r-- | src/nvim/api/private/dispatch.h | 5 | ||||
| -rw-r--r-- | src/nvim/api/private/helpers.h | 5 | ||||
| -rw-r--r-- | src/nvim/api/private/validate.h | 5 |
5 files changed, 5 insertions, 20 deletions
diff --git a/src/nvim/api/private/converter.h b/src/nvim/api/private/converter.h index 28ae71983b..47e1d5a6bb 100644 --- a/src/nvim/api/private/converter.h +++ b/src/nvim/api/private/converter.h @@ -1,5 +1,4 @@ -#ifndef NVIM_API_PRIVATE_CONVERTER_H -#define NVIM_API_PRIVATE_CONVERTER_H +#pragma once #include "nvim/api/private/defs.h" #include "nvim/eval/typval_defs.h" @@ -7,5 +6,3 @@ #ifdef INCLUDE_GENERATED_DECLARATIONS # include "api/private/converter.h.generated.h" #endif - -#endif // NVIM_API_PRIVATE_CONVERTER_H diff --git a/src/nvim/api/private/defs.h b/src/nvim/api/private/defs.h index b467ce75a9..067592ed4e 100644 --- a/src/nvim/api/private/defs.h +++ b/src/nvim/api/private/defs.h @@ -1,5 +1,4 @@ -#ifndef NVIM_API_PRIVATE_DEFS_H -#define NVIM_API_PRIVATE_DEFS_H +#pragma once #include <stdbool.h> #include <stdint.h> @@ -139,5 +138,3 @@ typedef struct { } KeySetLink; typedef KeySetLink *(*FieldHashfn)(const char *str, size_t len); - -#endif // NVIM_API_PRIVATE_DEFS_H diff --git a/src/nvim/api/private/dispatch.h b/src/nvim/api/private/dispatch.h index 78fcf88d7b..49332bfecc 100644 --- a/src/nvim/api/private/dispatch.h +++ b/src/nvim/api/private/dispatch.h @@ -1,5 +1,4 @@ -#ifndef NVIM_API_PRIVATE_DISPATCH_H -#define NVIM_API_PRIVATE_DISPATCH_H +#pragma once #include <stdbool.h> #include <stdint.h> @@ -30,5 +29,3 @@ extern const MsgpackRpcRequestHandler method_handlers[]; # include "api/private/dispatch_wrappers.h.generated.h" # include "keysets_defs.generated.h" #endif - -#endif // NVIM_API_PRIVATE_DISPATCH_H diff --git a/src/nvim/api/private/helpers.h b/src/nvim/api/private/helpers.h index 8911e145e7..82c24b7c65 100644 --- a/src/nvim/api/private/helpers.h +++ b/src/nvim/api/private/helpers.h @@ -1,5 +1,4 @@ -#ifndef NVIM_API_PRIVATE_HELPERS_H -#define NVIM_API_PRIVATE_HELPERS_H +#pragma once #include <stdbool.h> #include <stddef.h> @@ -199,5 +198,3 @@ typedef struct { current_channel_id = save_channel_id; \ current_sctx = save_current_sctx; \ } while (0); - -#endif // NVIM_API_PRIVATE_HELPERS_H diff --git a/src/nvim/api/private/validate.h b/src/nvim/api/private/validate.h index 089b8d2f9c..29ca6242f3 100644 --- a/src/nvim/api/private/validate.h +++ b/src/nvim/api/private/validate.h @@ -1,5 +1,4 @@ -#ifndef NVIM_API_PRIVATE_VALIDATE_H -#define NVIM_API_PRIVATE_VALIDATE_H +#pragma once #include <stdbool.h> #include <stddef.h> @@ -95,5 +94,3 @@ #ifdef INCLUDE_GENERATED_DECLARATIONS # include "api/private/validate.h.generated.h" #endif - -#endif // NVIM_API_PRIVATE_VALIDATE_H |