-
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.
Previously (603949f) we made some changes to `TrimUtil` to return a `std::shared_ptr<void>` containing the internal variables used in the algorithm. This allowed us to defer destruction in `TrimUtil` so that we can skip it with `std::_Exit` later on - saving 1-2%. The change did not sit well with me and is not very idiomatic. This commit changes both `BuildDirUtil` and `TrimUtil` to be constructible and have their static methods changed to non-`const` member variables. We store the variables in a `std::unique_ptr` to defer destruction of the state until the destructor of the `*Util` - which is skipped when we call `std::_Exit`.
- Loading branch information
1 parent
603949f
commit 65c9056
Showing
5 changed files
with
94 additions
and
41 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
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