Rename and protect BufferedSink::write
The `write` name is ambiguous and could lead to some funny bugs like https://github.com/NixOS/nix/pull/8173#issuecomment-1500009480. So rename it to the more explicit `writeUnbuffered`. Besides, this method shouldn't be (and isn't) used outside of the class implementation, so mark it `protected`. This makes it more symetrical to `BufferedSource` which uses a `protected readUnbuffered` method.
This commit is contained in:
@@ -12,7 +12,7 @@ namespace nix {
|
||||
struct CompressionSink : BufferedSink, FinishSink
|
||||
{
|
||||
using BufferedSink::operator ();
|
||||
using BufferedSink::write;
|
||||
using BufferedSink::writeUnbuffered;
|
||||
using FinishSink::finish;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user