terminal/src/renderer/dx
Dustin L. Howett 54a7fce3e0
Move to GSL 3.1.0 (#6908)
GSL 3, the next major version of GSL after the one we're using, replaced
their local implementation of `span` with one that more closely mimics
C++20's span. Unfortunately, that is a breaking change for all of GSL's
consumers.

This commit updates our use of span to comply with the new changes in
GSL 3.

Chief among those breaking changes is:

* `span::at` no longer exists; I replaced many instances of `span::at`
  with `gsl::at(x)`
* `span::size_type` has finally given up on `ptrdiff_t` and become
  `size_t` like all other containers

While I was here, I also made the following mechanical replacements:

* In some of our "early standardized" code, we used std::optional's
  `has_value` and `value` back-to-back. Each `value` incurs an
  additional presence test.
  * Change: `x.value().member` -> `x->member` (`optional::operator->`
    skips the presence test)
  * Change: `x.value()` -> `*x` (as above)
* GSL 3 uses `size_t` for `size_type`.
  * Change: `gsl::narrow<size_t>(x.size())` -> `x.size()`
  * Change: `gsl::narrow<ptrdiff_t>(nonSpan.size())` -> `nonSpan.size()`
    during span construction

I also replaced two instances of `x[x.size() - 1]` with `x.back()` and
one instance of a manual array walk (for comparison) with a direct
comparison.

NOTE: Span comparison and `make_span` are not part of the C++20 span
library.

Fixes #6251
2020-07-14 18:30:59 +00:00
..
lib Scale box drawing glyphs to fit cells for visual bliss (#5743) 2020-05-08 14:09:32 -07:00
ut_dx Import build fix changes from OS for sync to a34a957cf 2020-03-16 18:26:48 +00:00
BoxDrawingEffect.cpp Scale box drawing glyphs to fit cells for visual bliss (#5743) 2020-05-08 14:09:32 -07:00
BoxDrawingEffect.h Scale box drawing glyphs to fit cells for visual bliss (#5743) 2020-05-08 14:09:32 -07:00
CustomTextLayout.cpp Restore simple text runs, correct for crashes (#6695) 2020-06-29 20:27:31 +00:00
CustomTextLayout.h Restore simple text runs, correct for crashes (#6695) 2020-06-29 20:27:31 +00:00
CustomTextRenderer.cpp Move to GSL 3.1.0 (#6908) 2020-07-14 18:30:59 +00:00
CustomTextRenderer.h Recycle assorted rendering components to accelerate drawing (#6483) 2020-06-22 16:13:09 +00:00
dirs Import build fix changes from OS for sync to a34a957cf 2020-03-16 18:26:48 +00:00
DxRenderer.cpp Refactor the renderer color calculations (#6853) 2020-07-10 22:26:34 +00:00
DxRenderer.hpp Add a ShortcutAction for toggling retro terminal effect (#6691) 2020-07-01 23:17:43 +00:00
IBoxDrawingEffect.idl Scale box drawing glyphs to fit cells for visual bliss (#5743) 2020-05-08 14:09:32 -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
ScreenPixelShader.h Scale retro terminal scan lines (#4716) 2020-02-26 00:08:45 +00:00
ScreenVertexShader.h Merged PR 4182306: [Git2Git] Merged PR 4182266: conhost: don't use D3DCompiler on inside-windows builds (and delete the shaders) 2020-01-23 00:42:56 +00:00
sources.inc Merged PR 4182306: [Git2Git] Merged PR 4182266: conhost: don't use D3DCompiler on inside-windows builds (and delete the shaders) 2020-01-23 00:42:56 +00:00