-
Notifications
You must be signed in to change notification settings - Fork 634
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace StringCycleChecker with scope guard
Summary: The `StringCycleChecker` is a little weird to use because it cannot return an error from its constructor. Instead, we have to check the result of the constructor using `foundCycle`, and have to ensure that the stack in the runtime is correctly set up so that the destructor can run safely. This is also inefficient, but that probably doesn't matter. Given that there are only two places it is currently used, a scope guard seems simpler and clearer. Reviewed By: kodafb Differential Revision: D29954709 fbshipit-source-id: 0eb814f4568f315453f7b0d3c63b363802157d7b
- Loading branch information
1 parent
295b4e1
commit 76be193
Showing
3 changed files
with
14 additions
and
39 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