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/lua/treesitter.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/nvim/lua/treesitter.h') diff --git a/src/nvim/lua/treesitter.h b/src/nvim/lua/treesitter.h index b69fb9dfae..c1c78b8a6a 100644 --- a/src/nvim/lua/treesitter.h +++ b/src/nvim/lua/treesitter.h @@ -1,5 +1,4 @@ -#ifndef NVIM_LUA_TREESITTER_H -#define NVIM_LUA_TREESITTER_H +#pragma once #include #include @@ -10,5 +9,3 @@ #ifdef INCLUDE_GENERATED_DECLARATIONS # include "lua/treesitter.h.generated.h" #endif - -#endif // NVIM_LUA_TREESITTER_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/lua/treesitter.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/nvim/lua/treesitter.h') diff --git a/src/nvim/lua/treesitter.h b/src/nvim/lua/treesitter.h index c1c78b8a6a..4ef9a10602 100644 --- a/src/nvim/lua/treesitter.h +++ b/src/nvim/lua/treesitter.h @@ -1,10 +1,6 @@ #pragma once -#include -#include -#include - -#include "tree_sitter/api.h" +#include // IWYU pragma: keep #ifdef INCLUDE_GENERATED_DECLARATIONS # include "lua/treesitter.h.generated.h" -- cgit