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/textformat.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/nvim/textformat.h') diff --git a/src/nvim/textformat.h b/src/nvim/textformat.h index fcc9c2d6f4..809e509db6 100644 --- a/src/nvim/textformat.h +++ b/src/nvim/textformat.h @@ -1,5 +1,4 @@ -#ifndef NVIM_TEXTFORMAT_H -#define NVIM_TEXTFORMAT_H +#pragma once #include "nvim/normal.h" #include "nvim/pos.h" @@ -7,4 +6,3 @@ #ifdef INCLUDE_GENERATED_DECLARATIONS # include "textformat.h.generated.h" #endif -#endif // NVIM_TEXTFORMAT_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/textformat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/textformat.h') diff --git a/src/nvim/textformat.h b/src/nvim/textformat.h index 809e509db6..4beafeb7ec 100644 --- a/src/nvim/textformat.h +++ b/src/nvim/textformat.h @@ -1,7 +1,7 @@ #pragma once #include "nvim/normal.h" -#include "nvim/pos.h" +#include "nvim/pos_defs.h" #ifdef INCLUDE_GENERATED_DECLARATIONS # include "textformat.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/textformat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/textformat.h') diff --git a/src/nvim/textformat.h b/src/nvim/textformat.h index 4beafeb7ec..b86df20f13 100644 --- a/src/nvim/textformat.h +++ b/src/nvim/textformat.h @@ -1,7 +1,7 @@ #pragma once #include "nvim/normal.h" -#include "nvim/pos_defs.h" +#include "nvim/pos_defs.h" // IWYU pragma: keep #ifdef INCLUDE_GENERATED_DECLARATIONS # include "textformat.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/textformat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/textformat.h') diff --git a/src/nvim/textformat.h b/src/nvim/textformat.h index b86df20f13..25e7152f1b 100644 --- a/src/nvim/textformat.h +++ b/src/nvim/textformat.h @@ -1,6 +1,6 @@ #pragma once -#include "nvim/normal.h" +#include "nvim/normal_defs.h" // IWYU pragma: keep #include "nvim/pos_defs.h" // IWYU pragma: keep #ifdef INCLUDE_GENERATED_DECLARATIONS -- cgit