terminal/src/types
Dustin L. Howett 80da24ecf8
Replace basic_string_view<T> with span<const T> (#6921)
We were using std::basic_string_view as a stand-in for std::span so that
we could change over all at once when C++20 dropped with full span
support. That day's not here yet, but as of 54a7fce3e we're using GSL 3,
whose span is C++20-compliant.

This commit replaces every instance of basic_string_view that was not
referring to an actual string with a span of the appropriate type.

I moved the `const` qualifier into span's `T` because while
`basic_string_view.at()` returns `const T&`, `span.at()` returns `T&`
(without the const). I wanted to maintain the invariant that members of
the span were immutable.

* Mechanical Changes
   * `sv.at(x)` -> `gsl::at(sp, x)`
   * `sv.c{begin,end}` -> `sp.{begin,end}` (span's iterators are const)

I had to replace a `std::basic_string<>` with a `std::vector<>` in
ConImeInfo, and I chose to replace a manual array walk in
ScreenInfoUiaProviderBase with a ranged-for. Please review those
specifically.

This will almost certainly cause a code size regression in Windows
because I'm blowing out all the PGO counts. Whoops.

Related: #3956, #975.
2020-07-15 16:40:42 +00:00
..
inc Account for WHEEL_DELTA when dispatching VT mouse wheel events (#6843) 2020-07-09 23:24:17 +00:00
lib Tie up some A11y loose threads (#6417) 2020-06-10 15:15:26 +00:00
ut_types Move to GSL 3.1.0 (#6908) 2020-07-14 18:30:59 +00:00
CodepointWidthDetector.cpp Partially regenerate codepoint widths from Emoji 13.0 (#5934) 2020-05-17 13:32:43 -07:00
convert.cpp Make most emojis full-width (#5795) 2020-05-08 22:31:09 +00:00
dirs Switch to v5 UUIDs as profile GUIDs for the default profiles (#913) 2019-05-21 13:29:16 -07:00
Environment.cpp Replace ConhostConnection with ConptyConnection (#3461) 2019-11-06 15:09:01 -08:00
FocusEvent.cpp Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
GlyphWidth.cpp Add GH issue IDs to all the suppress/disables that I left behind as they were a bit too challenging to solve with this giant PR 2019-09-05 11:14:43 -07:00
IBaseData.h Search - add search box control and implement search experience (#3590) 2019-12-17 15:52:37 +00:00
IControlAccessibilityInfo.h hook up UIA tree to WPF control (#4548) 2020-02-24 23:17:55 +00:00
IInputEvent.cpp Make loop in IInputEvent more consistent and modern (#4959) 2020-03-17 10:52:33 -07:00
IInputEventStreams.cpp Improve debugging experience of key events (#2872) 2019-09-24 13:50:53 -07:00
IUiaData.h Properly represent block selections in UIA (#4991) 2020-03-18 21:03:51 +00:00
IUiaEventDispatcher.h Attach UiaRenderer and Fire Selection Changed Events (#2989) 2019-12-11 13:52:49 -08:00
IUiaTraceable.h Add more object ID tracing for Accessibility (#5215) 2020-04-03 20:06:47 +00:00
KeyEvent.cpp Improve debugging experience of key events (#2872) 2019-09-24 13:50:53 -07:00
MenuEvent.cpp Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
ModifierKeyState.cpp Fix a bunch of spelling errors across the project (#4295) 2020-02-10 20:40:01 +00:00
MouseEvent.cpp Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
precomp.cpp Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
precomp.h Accessibility: Set-up UIA Tree (#1691) 2019-07-29 15:21:15 -07:00
ScreenInfoUiaProviderBase.cpp Replace basic_string_view<T> with span<const T> (#6921) 2020-07-15 16:40:42 +00:00
ScreenInfoUiaProviderBase.h Cache the size viewport structure inside TextBuffer (#6841) 2020-07-09 11:18:25 +00:00
sources.inc Tie up some A11y loose threads (#6417) 2020-06-10 15:15:26 +00:00
TermControlUiaProvider.cpp Properly represent block selections in UIA (#4991) 2020-03-18 21:03:51 +00:00
TermControlUiaProvider.hpp hook up UIA tree to WPF control (#4548) 2020-02-24 23:17:55 +00:00
TermControlUiaTextRange.cpp Adjusts High DPI scaling to enable differential rendering (#5345) 2020-04-22 14:59:51 -07:00
TermControlUiaTextRange.hpp Properly represent block selections in UIA (#4991) 2020-03-18 21:03:51 +00:00
ThemeUtils.cpp Use standard 1px window borders on NC Island Window (#3394) 2019-11-04 15:45:40 -08:00
UiaTextRangeBase.cpp UIA: Prevent crash from invalid UTR endpoint comparison (#5399) 2020-04-21 16:45:17 +00:00
UiaTextRangeBase.hpp Add more object ID tracing for Accessibility (#5215) 2020-04-03 20:06:47 +00:00
UiaTracing.cpp Add more object ID tracing for Accessibility (#5215) 2020-04-03 20:06:47 +00:00
UiaTracing.h Add more object ID tracing for Accessibility (#5215) 2020-04-03 20:06:47 +00:00
Utf16Parser.cpp C26447,C26440 - is noexcept but can throw or doesn't throw but not noexcept 2019-08-29 15:23:07 -07:00
utils.cpp Replace the color table init code with two const arrays (#6913) 2020-07-15 15:53:38 +00:00
viewport.cpp ci: run spell check in CI, fix remaining issues (#4799) 2020-03-25 11:02:53 -07:00
WindowBufferSizeEvent.cpp Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00