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/memline.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/nvim/memline.h') diff --git a/src/nvim/memline.h b/src/nvim/memline.h index f4190f0210..97a1f99b85 100644 --- a/src/nvim/memline.h +++ b/src/nvim/memline.h @@ -1,5 +1,4 @@ -#ifndef NVIM_MEMLINE_H -#define NVIM_MEMLINE_H +#pragma once #include "nvim/buffer_defs.h" #include "nvim/pos.h" @@ -8,4 +7,3 @@ #ifdef INCLUDE_GENERATED_DECLARATIONS # include "memline.h.generated.h" #endif -#endif // NVIM_MEMLINE_H -- cgit From 09541d514dd18bf86f673d3784d406236fcbdad8 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 27 Nov 2023 09:51:26 +0800 Subject: build(IWYU): replace public-to-public mappings with pragmas (#26237) --- src/nvim/memline.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/nvim/memline.h') diff --git a/src/nvim/memline.h b/src/nvim/memline.h index 97a1f99b85..8a49c4faaf 100644 --- a/src/nvim/memline.h +++ b/src/nvim/memline.h @@ -1,6 +1,7 @@ #pragma once -#include "nvim/buffer_defs.h" +#include "nvim/buffer_defs.h" // IWYU pragma: keep +#include "nvim/memline_defs.h" // IWYU pragma: export #include "nvim/pos.h" #include "nvim/types.h" -- 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/memline.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/memline.h') diff --git a/src/nvim/memline.h b/src/nvim/memline.h index 8a49c4faaf..2cbe8f753b 100644 --- a/src/nvim/memline.h +++ b/src/nvim/memline.h @@ -2,7 +2,7 @@ #include "nvim/buffer_defs.h" // IWYU pragma: keep #include "nvim/memline_defs.h" // IWYU pragma: export -#include "nvim/pos.h" +#include "nvim/pos_defs.h" #include "nvim/types.h" #ifdef INCLUDE_GENERATED_DECLARATIONS -- cgit From 6c14ae6bfaf51415b555e9a6b85d1d280976358d Mon Sep 17 00:00:00 2001 From: dundargoc Date: Mon, 27 Nov 2023 20:27:32 +0100 Subject: refactor: rename types.h to types_defs.h --- src/nvim/memline.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/memline.h') diff --git a/src/nvim/memline.h b/src/nvim/memline.h index 2cbe8f753b..77e2abfb6d 100644 --- a/src/nvim/memline.h +++ b/src/nvim/memline.h @@ -3,7 +3,7 @@ #include "nvim/buffer_defs.h" // IWYU pragma: keep #include "nvim/memline_defs.h" // IWYU pragma: export #include "nvim/pos_defs.h" -#include "nvim/types.h" +#include "nvim/types_defs.h" #ifdef INCLUDE_GENERATED_DECLARATIONS # include "memline.h.generated.h" -- 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/memline.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/nvim/memline.h') diff --git a/src/nvim/memline.h b/src/nvim/memline.h index 77e2abfb6d..e70a8e423e 100644 --- a/src/nvim/memline.h +++ b/src/nvim/memline.h @@ -2,8 +2,8 @@ #include "nvim/buffer_defs.h" // IWYU pragma: keep #include "nvim/memline_defs.h" // IWYU pragma: export -#include "nvim/pos_defs.h" -#include "nvim/types_defs.h" +#include "nvim/pos_defs.h" // IWYU pragma: keep +#include "nvim/types_defs.h" // IWYU pragma: keep #ifdef INCLUDE_GENERATED_DECLARATIONS # include "memline.h.generated.h" -- cgit