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/change.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/nvim/change.h') diff --git a/src/nvim/change.h b/src/nvim/change.h index d1d016c630..e6a78e966f 100644 --- a/src/nvim/change.h +++ b/src/nvim/change.h @@ -1,5 +1,4 @@ -#ifndef NVIM_CHANGE_H -#define NVIM_CHANGE_H +#pragma once #include "nvim/buffer_defs.h" #include "nvim/pos.h" @@ -15,5 +14,3 @@ #ifdef INCLUDE_GENERATED_DECLARATIONS # include "change.h.generated.h" #endif - -#endif // NVIM_CHANGE_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/change.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/change.h') diff --git a/src/nvim/change.h b/src/nvim/change.h index e6a78e966f..34cea981d1 100644 --- a/src/nvim/change.h +++ b/src/nvim/change.h @@ -1,6 +1,6 @@ #pragma once -#include "nvim/buffer_defs.h" +#include "nvim/buffer_defs.h" // IWYU pragma: keep #include "nvim/pos.h" // flags for open_line() -- cgit From f4aedbae4cb1f206f5b7c6142697b71dd473059b Mon Sep 17 00:00:00 2001 From: dundargoc Date: Mon, 27 Nov 2023 18:39:38 +0100 Subject: build(IWYU): fix includes for undo_defs.h --- src/nvim/change.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/change.h') diff --git a/src/nvim/change.h b/src/nvim/change.h index 34cea981d1..1c90b67fe3 100644 --- a/src/nvim/change.h +++ b/src/nvim/change.h @@ -1,7 +1,7 @@ #pragma once #include "nvim/buffer_defs.h" // IWYU pragma: keep -#include "nvim/pos.h" +#include "nvim/pos_defs.h" // flags for open_line() #define OPENLINE_DELSPACES 0x01 // delete spaces after cursor -- cgit From 718053b7a97c4e2fbaa6077d3c9f4dc7012c8aad Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 28 Nov 2023 07:47:36 +0800 Subject: refactor: fix runtime_defs.h (#26259) --- src/nvim/change.h | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'src/nvim/change.h') diff --git a/src/nvim/change.h b/src/nvim/change.h index 1c90b67fe3..06155b6da6 100644 --- a/src/nvim/change.h +++ b/src/nvim/change.h @@ -1,15 +1,17 @@ #pragma once #include "nvim/buffer_defs.h" // IWYU pragma: keep -#include "nvim/pos_defs.h" +#include "nvim/pos_defs.h" // IWYU pragma: keep -// flags for open_line() -#define OPENLINE_DELSPACES 0x01 // delete spaces after cursor -#define OPENLINE_DO_COM 0x02 // format comments -#define OPENLINE_KEEPTRAIL 0x04 // keep trailing spaces -#define OPENLINE_MARKFIX 0x08 // fix mark positions -#define OPENLINE_COM_LIST 0x10 // format comments with list/2nd line indent -#define OPENLINE_FORMAT 0x20 // formatting long comment +/// flags for open_line() +enum { + OPENLINE_DELSPACES = 0x01, ///< delete spaces after cursor + OPENLINE_DO_COM = 0x02, ///< format comments + OPENLINE_KEEPTRAIL = 0x04, ///< keep trailing spaces + OPENLINE_MARKFIX = 0x08, ///< fix mark positions + OPENLINE_COM_LIST = 0x10, ///< format comments with list/2nd line indent + OPENLINE_FORMAT = 0x20, ///< formatting long comment +}; #ifdef INCLUDE_GENERATED_DECLARATIONS # include "change.h.generated.h" -- cgit