mirror of
https://github.com/microsoft/terminal.git
synced 2026-04-14 02:01:01 +00:00
* `[[nodiscard]]` and `[[maybe_unused]]` must come before `virtual` and `static` qualifiers * MSVC and Clang disagree on how `gsl::suppress` should look; fortunately, GSL provides a macro to paper over the difference * Clang throws "pessimizing move" warnings when you `std::move` a temporary, as it makes copy elision impossible * The fuzzing logic was using an unspecified template expansion `CFuzzLogic<>` before the type had been declared * LibraryResources was emitting most of the `.util` section with read-write permissions and some of it with read-only Refs #15952
44 lines
1.2 KiB
C++
44 lines
1.2 KiB
C++
// Copyright (c) Microsoft Corporation.
|
|
// Licensed under the MIT license.
|
|
|
|
#include "precomp.h"
|
|
|
|
#include "textBufferTextIterator.hpp"
|
|
|
|
#include "Row.hpp"
|
|
|
|
#pragma hdrstop
|
|
|
|
using namespace Microsoft::Console::Types;
|
|
|
|
// Routine Description:
|
|
// - Narrows the view of a cell iterator into a text only iterator.
|
|
// Arguments:
|
|
// - A cell iterator
|
|
TextBufferTextIterator::TextBufferTextIterator(const TextBufferCellIterator& cellIt) noexcept :
|
|
TextBufferCellIterator(cellIt)
|
|
{
|
|
}
|
|
|
|
// Routine Description:
|
|
// - Returns the text information from the text buffer position addressed by this iterator.
|
|
// Return Value:
|
|
// - Read only UTF-16 text data
|
|
// TODO GH 2682, fix design so this doesn't have to be suppressed.
|
|
GSL_SUPPRESS(26434)
|
|
const std::wstring_view TextBufferTextIterator::operator*() const noexcept
|
|
{
|
|
return _view.Chars();
|
|
}
|
|
|
|
// Routine Description:
|
|
// - Returns the text information from the text buffer position addressed by this iterator.
|
|
// Return Value:
|
|
// - Read only UTF-16 text data
|
|
// TODO GH 2682, fix design so this doesn't have to be suppressed.
|
|
GSL_SUPPRESS(26434)
|
|
const std::wstring_view* TextBufferTextIterator::operator->() const noexcept
|
|
{
|
|
return &_view.Chars();
|
|
}
|