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/ex_cmds2.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/nvim/ex_cmds2.h') diff --git a/src/nvim/ex_cmds2.h b/src/nvim/ex_cmds2.h index 3a41e105f3..ad5008f310 100644 --- a/src/nvim/ex_cmds2.h +++ b/src/nvim/ex_cmds2.h @@ -1,5 +1,4 @@ -#ifndef NVIM_EX_CMDS2_H -#define NVIM_EX_CMDS2_H +#pragma once #include "nvim/ex_cmds_defs.h" @@ -15,4 +14,3 @@ #ifdef INCLUDE_GENERATED_DECLARATIONS # include "ex_cmds2.h.generated.h" #endif -#endif // NVIM_EX_CMDS2_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/ex_cmds2.h | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'src/nvim/ex_cmds2.h') diff --git a/src/nvim/ex_cmds2.h b/src/nvim/ex_cmds2.h index ad5008f310..4f41f2cc41 100644 --- a/src/nvim/ex_cmds2.h +++ b/src/nvim/ex_cmds2.h @@ -1,15 +1,16 @@ #pragma once -#include "nvim/ex_cmds_defs.h" +#include "nvim/buffer_defs.h" // IWYU pragma: keep +#include "nvim/ex_cmds_defs.h" // IWYU pragma: keep -// -// flags for check_changed() -// -#define CCGD_AW 1 // do autowrite if buffer was changed -#define CCGD_MULTWIN 2 // check also when several wins for the buf -#define CCGD_FORCEIT 4 // ! used -#define CCGD_ALLBUF 8 // may write all buffers -#define CCGD_EXCMD 16 // may suggest using ! +/// flags for check_changed() +enum { + CCGD_AW = 1, ///< do autowrite if buffer was changed + CCGD_MULTWIN = 2, ///< check also when several wins for the buf + CCGD_FORCEIT = 4, ///< ! used + CCGD_ALLBUF = 8, ///< may write all buffers + CCGD_EXCMD = 16, ///< may suggest using ! +}; #ifdef INCLUDE_GENERATED_DECLARATIONS # include "ex_cmds2.h.generated.h" -- cgit