From 4f8941c1a5f1ef6caa410feeb52e343db22763ce Mon Sep 17 00:00:00 2001 From: dundargoc Date: Fri, 10 Nov 2023 12:23:42 +0100 Subject: 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. --- src/nvim/state.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/nvim/state.h') diff --git a/src/nvim/state.h b/src/nvim/state.h index 76a38b0dab..326beaa9d9 100644 --- a/src/nvim/state.h +++ b/src/nvim/state.h @@ -1,5 +1,4 @@ -#ifndef NVIM_STATE_H -#define NVIM_STATE_H +#pragma once #include @@ -18,5 +17,3 @@ struct vim_state { #ifdef INCLUDE_GENERATED_DECLARATIONS # include "state.h.generated.h" #endif - -#endif // NVIM_STATE_H -- cgit From 574d25642fc9ca65b396633aeab6e2d32778b642 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 27 Nov 2023 17:21:58 +0800 Subject: refactor: move Arena and ArenaMem to memory_defs.h (#26240) --- src/nvim/state.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/nvim/state.h') diff --git a/src/nvim/state.h b/src/nvim/state.h index 326beaa9d9..6617b77fa0 100644 --- a/src/nvim/state.h +++ b/src/nvim/state.h @@ -1,9 +1,5 @@ #pragma once -#include - -struct vim_state; - typedef struct vim_state VimState; typedef int (*state_check_callback)(VimState *state); -- cgit From a6cba103cebce535279db197f9efeb34e9d1171f Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 29 Nov 2023 20:32:40 +0800 Subject: refactor: move some constants out of vim_defs.h (#26298) --- src/nvim/state.h | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src/nvim/state.h') diff --git a/src/nvim/state.h b/src/nvim/state.h index 6617b77fa0..8c5957bf9a 100644 --- a/src/nvim/state.h +++ b/src/nvim/state.h @@ -1,14 +1,6 @@ #pragma once -typedef struct vim_state VimState; - -typedef int (*state_check_callback)(VimState *state); -typedef int (*state_execute_callback)(VimState *state, int key); - -struct vim_state { - state_check_callback check; - state_execute_callback execute; -}; +#include "nvim/state_defs.h" // IWYU pragma: export #ifdef INCLUDE_GENERATED_DECLARATIONS # include "state.h.generated.h" -- cgit