forked from microsoft/terminal
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace til::some with til::small_vector (microsoft#16952)
`til::small_vector` had a bug: Its internal backing buffer didn't prevent default initialization! Wrapping it in an `union` fixed that. `til::some` had the same issue, but thinking about it I realized we don't need both classes to exist, so I removed `til::some` since `til::small_vector` is more flexible. Checking the assembly, I noticed that `til::small_vector` with the `union` fix produced a more compact result. I also noticed that in combination with function calls and inlining the bit-wise ANDs in the point/size/rect boolean operators produced poor-ish results. Since their impact on performance is negligible to begin with I simplified that code slightly. Finally, I noticed that the boolean operator for `til::point` was incorrect since it checked for `>0` instead of `>=0`. Luckily nothing seemed to have used that operator yet. (= No inbox regression.)
- Loading branch information
Showing
21 changed files
with
77 additions
and
707 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,6 @@ | |
|
||
#pragma once | ||
|
||
#include "small_vector.h" | ||
|
||
#ifdef UNIT_TESTING | ||
class RunLengthEncodingTests; | ||
#endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.