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/cursor.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/nvim/cursor.h') diff --git a/src/nvim/cursor.h b/src/nvim/cursor.h index 1cbe8a609e..1baa83d327 100644 --- a/src/nvim/cursor.h +++ b/src/nvim/cursor.h @@ -1,5 +1,4 @@ -#ifndef NVIM_CURSOR_H -#define NVIM_CURSOR_H +#pragma once #include @@ -8,5 +7,3 @@ #ifdef INCLUDE_GENERATED_DECLARATIONS # include "cursor.h.generated.h" #endif - -#endif // NVIM_CURSOR_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/cursor.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/nvim/cursor.h') diff --git a/src/nvim/cursor.h b/src/nvim/cursor.h index 1baa83d327..bd70ccfe60 100644 --- a/src/nvim/cursor.h +++ b/src/nvim/cursor.h @@ -1,8 +1,7 @@ #pragma once -#include - -#include "nvim/vim.h" +#include "nvim/buffer_defs.h" // IWYU pragma: keep +#include "nvim/pos.h" #ifdef INCLUDE_GENERATED_DECLARATIONS # include "cursor.h.generated.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/cursor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/cursor.h') diff --git a/src/nvim/cursor.h b/src/nvim/cursor.h index bd70ccfe60..ea63f7c1e5 100644 --- a/src/nvim/cursor.h +++ b/src/nvim/cursor.h @@ -1,7 +1,7 @@ #pragma once #include "nvim/buffer_defs.h" // IWYU pragma: keep -#include "nvim/pos.h" +#include "nvim/pos_defs.h" #ifdef INCLUDE_GENERATED_DECLARATIONS # include "cursor.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/cursor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/cursor.h') diff --git a/src/nvim/cursor.h b/src/nvim/cursor.h index ea63f7c1e5..d50976b598 100644 --- a/src/nvim/cursor.h +++ b/src/nvim/cursor.h @@ -1,7 +1,7 @@ #pragma once #include "nvim/buffer_defs.h" // IWYU pragma: keep -#include "nvim/pos_defs.h" +#include "nvim/pos_defs.h" // IWYU pragma: keep #ifdef INCLUDE_GENERATED_DECLARATIONS # include "cursor.h.generated.h" -- cgit