terminal/src/tsf
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
..
ConsoleTSF.cpp ci: run spell check in CI, fix remaining issues (#4799) 2020-03-25 11:02:53 -07:00
ConsoleTSF.h Change NULL to nullptr since they are pointers (#4960) 2020-03-20 20:35:12 +00:00
contsf.cpp Change NULL to nullptr since they are pointers (#4960) 2020-03-20 20:35:12 +00:00
globals.h add clang-format conf to the project, format the c++ code (#1141) 2019-06-11 13:27:09 -07:00
precomp.cpp Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
precomp.h Replace old C headers (xxx.h) with modern ones (cxxx) (#5080) 2020-07-01 11:00:24 -07:00
sources ci: run spell check in CI, fix remaining issues (#4799) 2020-03-25 11:02:53 -07:00
TfCatUtil.cpp add clang-format conf to the project, format the c++ code (#1141) 2019-06-11 13:27:09 -07:00
TfCatUtil.h add clang-format conf to the project, format the c++ code (#1141) 2019-06-11 13:27:09 -07:00
TfConvArea.cpp Replace basic_string_view<T> with span<const T> (#6921) 2020-07-15 16:40:42 +00:00
TfConvArea.h add clang-format conf to the project, format the c++ code (#1141) 2019-06-11 13:27:09 -07:00
TfCtxtComp.h Remove ATL dependencies (#676) (#719) 2019-05-21 10:32:43 -07:00
TfDispAttr.cpp Change NULL to nullptr since they are pointers (#4960) 2020-03-20 20:35:12 +00:00
TfDispAttr.h add clang-format conf to the project, format the c++ code (#1141) 2019-06-11 13:27:09 -07:00
TfEditSession.cpp ci: run spell check in CI, fix remaining issues (#4799) 2020-03-25 11:02:53 -07:00
TfEditSession.h ci: run spell check in CI, fix remaining issues (#4799) 2020-03-25 11:02:53 -07:00
TfTxtevCb.cpp ci: run spell check in CI, fix remaining issues (#4799) 2020-03-25 11:02:53 -07:00
tsf.vcxproj ci: run spell check in CI, fix remaining issues (#4799) 2020-03-25 11:02:53 -07:00
tsf.vcxproj.filters ci: run spell check in CI, fix remaining issues (#4799) 2020-03-25 11:02:53 -07:00