Commit 5b07a597 authored by Paal Kvamme's avatar Paal Kvamme
Browse files

Fix code smell caused by ambiguous arguments.

parent 450a3f41
......@@ -763,10 +763,12 @@ private:
compressor_t _lodcompressor;
public:
struct OpenForUpdate{};
/**
* \copydoc IZgyWriter::open()
*/
ZgyWriter(const ZgyWriterArgs& args)
explicit ZgyWriter(const ZgyWriterArgs& args)
: _fd()
, _accessor_rw()
, _dirty(false)
......@@ -819,7 +821,7 @@ public:
* See the ZgyReader constructor and the "truncate" ZgyWriter constructor.
* Understandably this nethod contains elements from both.
*/
ZgyWriter(const ZgyWriterArgs& args, bool update)
ZgyWriter(const ZgyWriterArgs& args, OpenForUpdate)
: _fd()
, _accessor_rw()
, _dirty(false)
......@@ -1995,7 +1997,7 @@ IZgyWriter::open(const ZgyWriterArgs& args)
std::shared_ptr<IZgyWriter>
IZgyWriter::reopen(const ZgyWriterArgs& args)
{
auto unsafe = std::shared_ptr<IZgyWriter>(new Impl::ZgyWriter(args, true));
auto unsafe = std::shared_ptr<IZgyWriter>(new Impl::ZgyWriter(args, Impl::ZgyWriter::OpenForUpdate{}));
return std::shared_ptr<IZgyWriter>(new Impl::ZgySafeWriter(unsafe));
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment