@@ -239,35 +239,6 @@ class zip_sink {
239
239
*/
240
240
zip_sink& operator =(const zip_sink&) = delete ;
241
241
242
- /* *
243
- * Move constructor
244
- *
245
- * @param other other instance
246
- */
247
- zip_sink (zip_sink&& other) :
248
- sink (std::move(other.sink)),
249
- headers (std::move(other.headers)),
250
- cd_written (other.cd_written),
251
- entry_counter (std::move(other.entry_counter)),
252
- entry_deflater (std::move(other.entry_deflater)),
253
- entry_crc (other.entry_crc) { }
254
-
255
- /* *
256
- * Move assignment operator
257
- *
258
- * @param other other instance
259
- * @return this instance
260
- */
261
- zip_sink& operator =(zip_sink&& other) {
262
- sink = std::move (other.sink );
263
- headers = std::move (other.headers );
264
- cd_written = other.cd_written ;
265
- entry_counter = std::move (other.entry_counter );
266
- entry_deflater = std::move (other.entry_deflater );
267
- entry_crc = other.entry_crc ;
268
- return *this ;
269
- }
270
-
271
242
/* *
272
243
* Write implementation
273
244
*
@@ -354,8 +325,9 @@ class zip_sink {
354
325
*/
355
326
template <typename Sink,
356
327
class = typename std::enable_if<!std::is_lvalue_reference<Sink>::value>::type>
357
- zip_sink<Sink> make_zip_sink (Sink&& sink) {
358
- return zip_sink<Sink>(std::move (sink));
328
+ sl::io::unique_sink<zip_sink<Sink>> make_zip_sink (Sink&& sink) {
329
+ auto ptr = new zip_sink<Sink>(std::move (sink));
330
+ return sl::io::make_unique_sink (ptr);
359
331
}
360
332
361
333
/* *
@@ -366,9 +338,10 @@ zip_sink<Sink> make_zip_sink(Sink&& sink) {
366
338
* @return zip sink
367
339
*/
368
340
template <typename Sink>
369
- zip_sink<sl::io::reference_sink<Sink>> make_zip_sink (Sink& sink) {
370
- return zip_sink<sl::io::reference_sink<Sink>> (
341
+ sl::io::unique_sink< zip_sink<sl::io::reference_sink<Sink> >> make_zip_sink (Sink& sink) {
342
+ auto ptr = new zip_sink<sl::io::reference_sink<Sink>> (
371
343
sl::io::make_reference_sink (sink));
344
+ return sl::io::make_unique_sink (ptr);
372
345
}
373
346
374
347
} // namespace
0 commit comments