aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/buffer.h
diff options
context:
space:
mode:
authordundargoc <gocdundar@gmail.com>2023-11-10 12:23:42 +0100
committerdundargoc <33953936+dundargoc@users.noreply.github.com>2023-11-12 22:01:28 +0100
commit4f8941c1a5f1ef6caa410feeb52e343db22763ce (patch)
tree6e801079d088533198d526cb9aac8eb7981dc568 /src/nvim/buffer.h
parent353a4be7e84fdc101318215bdcc8a7e780d737fe (diff)
downloadrneovim-4f8941c1a5f1ef6caa410feeb52e343db22763ce.tar.gz
rneovim-4f8941c1a5f1ef6caa410feeb52e343db22763ce.tar.bz2
rneovim-4f8941c1a5f1ef6caa410feeb52e343db22763ce.zip
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.
Diffstat (limited to 'src/nvim/buffer.h')
-rw-r--r--src/nvim/buffer.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/nvim/buffer.h b/src/nvim/buffer.h
index 2b0e6b2525..83c9e20041 100644
--- a/src/nvim/buffer.h
+++ b/src/nvim/buffer.h
@@ -1,5 +1,4 @@
-#ifndef NVIM_BUFFER_H
-#define NVIM_BUFFER_H
+#pragma once
#include <assert.h>
#include <stdbool.h>
@@ -140,5 +139,3 @@ static inline bool buf_is_empty(buf_T *buf)
return buf->b_ml.ml_line_count == 1
&& *ml_get_buf(buf, 1) == '\0';
}
-
-#endif // NVIM_BUFFER_H