summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2025-07-10 09:08:24 +1000
committerMaxime Coste <mawww@kakoune.org>2025-07-10 09:08:24 +1000
commit580c62a266439c24d0941d3b7e4c42149ab4a8e1 (patch)
tree7597c0afa4ba46f96829658445b15dbad38cd7f9 /src
parent9d706ce0b7d0f744274c6c19bbcd73f0c37205dd (diff)
More CI compilation fixes
Diffstat (limited to 'src')
-rw-r--r--src/file.hh2
-rw-r--r--src/normal.cc2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/file.hh b/src/file.hh
index f5dfa112..5362b342 100644
--- a/src/file.hh
+++ b/src/file.hh
@@ -115,7 +115,7 @@ struct BufferedWriter
while (not data.empty())
{
const ByteCount length = data.length();
- const ByteCount write_len = std::min(length, size - m_pos);
+ const ByteCount write_len = clamp(length, ByteCount{0}, size - m_pos);
memcpy(m_buffer + m_pos, data.data(), (int)write_len);
m_pos += write_len;
if (m_pos == size)
diff --git a/src/normal.cc b/src/normal.cc
index 96940a90..58013a2e 100644
--- a/src/normal.cc
+++ b/src/normal.cc
@@ -28,6 +28,8 @@
#include "window.hh"
#include "word_db.hh"
+#include <memory>
+
namespace Kakoune
{