-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
If the `read_stream()` method ever would have been called with a non-positive `max_size` value, it could have done unsafe things. But this theoretical warning suggests reconsidering a more fundamental problem: actually, there is no point in this method being a general-purpose stream reader in the first place, receiving the buffer size as a parameter, since it is only ever called with a constant value (`Serializer::MAX_SIZE`). Premature abstraction is the other root of all evil, so let's just rename it to `read_serialized_patch()`, and get rid of the general-purpose `max_size` parameter.
- Loading branch information
1 parent
52829ee
commit 0730f01
Showing
2 changed files
with
8 additions
and
13 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