Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Preprocessor: refactor streambuf management of preprocessor objects
Instead of using this complex system where new processor objects registered themselves as the current preprocessor object in the base class ctor (this led to freestanding `new` statements that looked like memory leaks), we now use a deque of unique_ptrs in the streambuf class. This makes the code a lot clearer since all the memory management is is one place.
- Loading branch information
Showing
1 changed file
with
79 additions
and
60 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 loop no longer processes the last preprocessor. In the last iteration it assigns the last preprocessor to
pre
, then it does++p
and notices that it has reached the end of the deque. And therefore the last preprocessor is never processed.You need to move this line to the beginning of the loop body.