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/event | |
| 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/event')
| -rw-r--r-- | src/nvim/event/defs.h | 5 | ||||
| -rw-r--r-- | src/nvim/event/libuv_process.h | 4 | ||||
| -rw-r--r-- | src/nvim/event/loop.h | 5 | ||||
| -rw-r--r-- | src/nvim/event/multiqueue.h | 4 | ||||
| -rw-r--r-- | src/nvim/event/process.h | 4 | ||||
| -rw-r--r-- | src/nvim/event/rstream.h | 4 | ||||
| -rw-r--r-- | src/nvim/event/signal.h | 4 | ||||
| -rw-r--r-- | src/nvim/event/socket.h | 4 | ||||
| -rw-r--r-- | src/nvim/event/stream.h | 4 | ||||
| -rw-r--r-- | src/nvim/event/time.h | 4 | ||||
| -rw-r--r-- | src/nvim/event/wstream.h | 4 |
11 files changed, 11 insertions, 35 deletions
diff --git a/src/nvim/event/defs.h b/src/nvim/event/defs.h index cf079681d0..571f61dfdb 100644 --- a/src/nvim/event/defs.h +++ b/src/nvim/event/defs.h @@ -1,5 +1,4 @@ -#ifndef NVIM_EVENT_DEFS_H -#define NVIM_EVENT_DEFS_H +#pragma once #include <assert.h> #include <stdarg.h> @@ -34,5 +33,3 @@ static inline Event event_create(argv_callback cb, int argc, ...) VA_EVENT_INIT(&event, cb, argc); return event; } - -#endif // NVIM_EVENT_DEFS_H diff --git a/src/nvim/event/libuv_process.h b/src/nvim/event/libuv_process.h index 4472839944..e3e2bfeb76 100644 --- a/src/nvim/event/libuv_process.h +++ b/src/nvim/event/libuv_process.h @@ -1,5 +1,4 @@ -#ifndef NVIM_EVENT_LIBUV_PROCESS_H -#define NVIM_EVENT_LIBUV_PROCESS_H +#pragma once #include <uv.h> @@ -24,4 +23,3 @@ static inline LibuvProcess libuv_process_init(Loop *loop, void *data) #ifdef INCLUDE_GENERATED_DECLARATIONS # include "event/libuv_process.h.generated.h" #endif -#endif // NVIM_EVENT_LIBUV_PROCESS_H diff --git a/src/nvim/event/loop.h b/src/nvim/event/loop.h index 7b4b724359..58216f7ec3 100644 --- a/src/nvim/event/loop.h +++ b/src/nvim/event/loop.h @@ -1,5 +1,4 @@ -#ifndef NVIM_EVENT_LOOP_H -#define NVIM_EVENT_LOOP_H +#pragma once #include <stdint.h> #include <uv.h> @@ -85,5 +84,3 @@ typedef struct loop { #ifdef INCLUDE_GENERATED_DECLARATIONS # include "event/loop.h.generated.h" #endif - -#endif // NVIM_EVENT_LOOP_H diff --git a/src/nvim/event/multiqueue.h b/src/nvim/event/multiqueue.h index 2c5ba9d436..e01ee1e710 100644 --- a/src/nvim/event/multiqueue.h +++ b/src/nvim/event/multiqueue.h @@ -1,5 +1,4 @@ -#ifndef NVIM_EVENT_MULTIQUEUE_H -#define NVIM_EVENT_MULTIQUEUE_H +#pragma once #include <uv.h> @@ -15,4 +14,3 @@ typedef void (*PutCallback)(MultiQueue *multiq, void *data); #ifdef INCLUDE_GENERATED_DECLARATIONS # include "event/multiqueue.h.generated.h" #endif -#endif // NVIM_EVENT_MULTIQUEUE_H diff --git a/src/nvim/event/process.h b/src/nvim/event/process.h index 69fe229b0e..234fc815af 100644 --- a/src/nvim/event/process.h +++ b/src/nvim/event/process.h @@ -1,5 +1,4 @@ -#ifndef NVIM_EVENT_PROCESS_H -#define NVIM_EVENT_PROCESS_H +#pragma once #include <stdbool.h> #include <stddef.h> @@ -83,4 +82,3 @@ static inline bool process_is_stopped(Process *proc) #ifdef INCLUDE_GENERATED_DECLARATIONS # include "event/process.h.generated.h" #endif -#endif // NVIM_EVENT_PROCESS_H diff --git a/src/nvim/event/rstream.h b/src/nvim/event/rstream.h index 23ed00bfea..b2a62acf83 100644 --- a/src/nvim/event/rstream.h +++ b/src/nvim/event/rstream.h @@ -1,5 +1,4 @@ -#ifndef NVIM_EVENT_RSTREAM_H -#define NVIM_EVENT_RSTREAM_H +#pragma once #include <stdbool.h> #include <stddef.h> @@ -11,4 +10,3 @@ #ifdef INCLUDE_GENERATED_DECLARATIONS # include "event/rstream.h.generated.h" #endif -#endif // NVIM_EVENT_RSTREAM_H diff --git a/src/nvim/event/signal.h b/src/nvim/event/signal.h index f9adf62c20..946de1b4f0 100644 --- a/src/nvim/event/signal.h +++ b/src/nvim/event/signal.h @@ -1,5 +1,4 @@ -#ifndef NVIM_EVENT_SIGNAL_H -#define NVIM_EVENT_SIGNAL_H +#pragma once #include <uv.h> @@ -23,4 +22,3 @@ struct signal_watcher { #ifdef INCLUDE_GENERATED_DECLARATIONS # include "event/signal.h.generated.h" #endif -#endif // NVIM_EVENT_SIGNAL_H diff --git a/src/nvim/event/socket.h b/src/nvim/event/socket.h index c6fcdec4bb..504af3c7a8 100644 --- a/src/nvim/event/socket.h +++ b/src/nvim/event/socket.h @@ -1,5 +1,4 @@ -#ifndef NVIM_EVENT_SOCKET_H -#define NVIM_EVENT_SOCKET_H +#pragma once #include <uv.h> @@ -39,4 +38,3 @@ struct socket_watcher { #ifdef INCLUDE_GENERATED_DECLARATIONS # include "event/socket.h.generated.h" #endif -#endif // NVIM_EVENT_SOCKET_H diff --git a/src/nvim/event/stream.h b/src/nvim/event/stream.h index 33d2d6e775..d02707dc45 100644 --- a/src/nvim/event/stream.h +++ b/src/nvim/event/stream.h @@ -1,5 +1,4 @@ -#ifndef NVIM_EVENT_STREAM_H -#define NVIM_EVENT_STREAM_H +#pragma once #include <stdbool.h> #include <stddef.h> @@ -61,4 +60,3 @@ struct stream { #ifdef INCLUDE_GENERATED_DECLARATIONS # include "event/stream.h.generated.h" #endif -#endif // NVIM_EVENT_STREAM_H diff --git a/src/nvim/event/time.h b/src/nvim/event/time.h index e84488fdd6..3514566901 100644 --- a/src/nvim/event/time.h +++ b/src/nvim/event/time.h @@ -1,5 +1,4 @@ -#ifndef NVIM_EVENT_TIME_H -#define NVIM_EVENT_TIME_H +#pragma once #include <stdbool.h> #include <uv.h> @@ -23,4 +22,3 @@ struct time_watcher { #ifdef INCLUDE_GENERATED_DECLARATIONS # include "event/time.h.generated.h" #endif -#endif // NVIM_EVENT_TIME_H diff --git a/src/nvim/event/wstream.h b/src/nvim/event/wstream.h index ef1311c619..4cba7bde8f 100644 --- a/src/nvim/event/wstream.h +++ b/src/nvim/event/wstream.h @@ -1,5 +1,4 @@ -#ifndef NVIM_EVENT_WSTREAM_H -#define NVIM_EVENT_WSTREAM_H +#pragma once #include <stdbool.h> #include <stddef.h> @@ -23,4 +22,3 @@ struct wbuffer { #ifdef INCLUDE_GENERATED_DECLARATIONS # include "event/wstream.h.generated.h" #endif -#endif // NVIM_EVENT_WSTREAM_H |