diff --git a/src/buffer.inl.hh b/src/buffer.inl.hh index 25ccb6740..4417536d5 100644 --- a/src/buffer.inl.hh +++ b/src/buffer.inl.hh @@ -164,7 +164,7 @@ inline const char& BufferIterator::operator[](size_t n) const inline size_t BufferIterator::operator-(const BufferIterator& iterator) const { kak_assert(m_buffer == iterator.m_buffer); - return (size_t)(int)m_buffer->distance(iterator.m_coord, m_coord); + return (size_t)m_buffer->distance(iterator.m_coord, m_coord); } inline BufferIterator BufferIterator::operator+(ByteCount size) const diff --git a/src/string.hh b/src/string.hh index c4bd86a41..390eacf1f 100644 --- a/src/string.hh +++ b/src/string.hh @@ -95,8 +95,8 @@ class String : public StringOps { public: String() {} - String(const char* content) : m_data(content, (size_t)(int)strlen(content)) {} - String(const char* content, ByteCount len) : m_data(content, (size_t)(int)len) {} + String(const char* content) : m_data(content, (size_t)strlen(content)) {} + String(const char* content, ByteCount len) : m_data(content, (size_t)len) {} explicit String(Codepoint cp, CharCount count = 1) { reserve(utf8::codepoint_size(cp) * (int)count); @@ -118,13 +118,13 @@ public: const char* c_str() const { return m_data.data(); } [[gnu::always_inline]] - void append(const char* data, ByteCount count) { m_data.append(data, (size_t)(int)count); } + void append(const char* data, ByteCount count) { m_data.append(data, (size_t)count); } void clear() { m_data.clear(); } void push_back(char c) { m_data.append(&c, 1); } - void force_size(ByteCount size) { m_data.force_size((size_t)(int)size); } - void reserve(ByteCount size) { m_data.reserve((size_t)(int)size); } + void force_size(ByteCount size) { m_data.force_size((size_t)size); } + void reserve(ByteCount size) { m_data.reserve((size_t)size); } static const String ms_empty;