Skip to content

Commit 07efae4

Browse files
committed
AuditMode fix
1 parent f3b4d82 commit 07efae4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/buffer/out/textBuffer.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,7 @@ void TextBuffer::_PrepareForDoubleByteSequence(const DbcsAttribute dbcsAttribute
409409
size_t TextBuffer::GraphemeNext(const std::wstring_view& chars, size_t position) noexcept
410410
{
411411
auto& cwd = CodepointWidthDetector::Singleton();
412+
#pragma warning(suppress : 26481) // Don't use pointer arithmetic. Use span instead (bounds.1).
412413
GraphemeState state{ .beg = chars.data() + position };
413414
cwd.GraphemeNext(state, chars);
414415
return position + state.len;
@@ -418,6 +419,7 @@ size_t TextBuffer::GraphemeNext(const std::wstring_view& chars, size_t position)
418419
size_t TextBuffer::GraphemePrev(const std::wstring_view& chars, size_t position) noexcept
419420
{
420421
auto& cwd = CodepointWidthDetector::Singleton();
422+
#pragma warning(suppress : 26481) // Don't use pointer arithmetic. Use span instead (bounds.1).
421423
GraphemeState state{ .beg = chars.data() + position };
422424
cwd.GraphemePrev(state, chars);
423425
return position - state.len;
@@ -469,6 +471,7 @@ size_t TextBuffer::FitTextIntoColumns(const std::wstring_view& chars, til::Coord
469471
col--;
470472
}
471473

474+
#pragma warning(suppress : 26481) // Don't use pointer arithmetic. Use span instead (bounds.1).
472475
GraphemeState state{ .beg = chars.data() + dist };
473476

474477
while (dist < len)

0 commit comments

Comments
 (0)