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/textobject.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/nvim/textobject.h') diff --git a/src/nvim/textobject.h b/src/nvim/textobject.h index e31557f297..cc8e22d6ef 100644 --- a/src/nvim/textobject.h +++ b/src/nvim/textobject.h @@ -1,5 +1,4 @@ -#ifndef NVIM_TEXTOBJECT_H -#define NVIM_TEXTOBJECT_H +#pragma once #include "nvim/normal.h" #include "nvim/pos.h" @@ -8,4 +7,3 @@ #ifdef INCLUDE_GENERATED_DECLARATIONS # include "textobject.h.generated.h" #endif -#endif // NVIM_TEXTOBJECT_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/textobject.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/textobject.h') diff --git a/src/nvim/textobject.h b/src/nvim/textobject.h index cc8e22d6ef..9e78a98d4a 100644 --- a/src/nvim/textobject.h +++ b/src/nvim/textobject.h @@ -1,7 +1,7 @@ #pragma once #include "nvim/normal.h" -#include "nvim/pos.h" +#include "nvim/pos_defs.h" #include "nvim/vim.h" #ifdef INCLUDE_GENERATED_DECLARATIONS -- cgit From 79b6ff28ad1204fbb4199b9092f5c578d88cb28e Mon Sep 17 00:00:00 2001 From: dundargoc Date: Tue, 28 Nov 2023 20:31:00 +0100 Subject: refactor: fix headers with IWYU --- src/nvim/textobject.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/textobject.h') diff --git a/src/nvim/textobject.h b/src/nvim/textobject.h index 9e78a98d4a..2ca5be43b7 100644 --- a/src/nvim/textobject.h +++ b/src/nvim/textobject.h @@ -2,7 +2,7 @@ #include "nvim/normal.h" #include "nvim/pos_defs.h" -#include "nvim/vim.h" +#include "nvim/vim_defs.h" #ifdef INCLUDE_GENERATED_DECLARATIONS # include "textobject.h.generated.h" -- cgit From 64b53b71ba5d804b2c8cf186be68931b2621f53c Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 29 Nov 2023 12:10:42 +0800 Subject: refactor(IWYU): create normal_defs.h (#26293) --- src/nvim/textobject.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/nvim/textobject.h') diff --git a/src/nvim/textobject.h b/src/nvim/textobject.h index 2ca5be43b7..a540c7c98f 100644 --- a/src/nvim/textobject.h +++ b/src/nvim/textobject.h @@ -1,7 +1,7 @@ #pragma once -#include "nvim/normal.h" -#include "nvim/pos_defs.h" +#include "nvim/normal_defs.h" // IWYU pragma: keep +#include "nvim/pos_defs.h" // IWYU pragma: keep #include "nvim/vim_defs.h" #ifdef INCLUDE_GENERATED_DECLARATIONS -- cgit