src.ctf.fs: remove ctf_fs_file_destroy
[babeltrace.git] / src / plugins / ctf / fs-src / file.cpp
index e3f7d7783c1c872ff5b52b30c40df97ad9a85c43..56c9c451da2b8089591f62d941db73b5282adf60 100644 (file)
@@ -8,27 +8,14 @@
 #include <stdio.h>
 #include <sys/stat.h>
 
+#include "cpp-common/bt2s/make-unique.hpp"
 #include "cpp-common/vendor/fmt/format.h"
 
 #include "file.hpp"
 
-void ctf_fs_file_destroy(struct ctf_fs_file *file)
-{
-    if (!file) {
-        return;
-    }
-
-    delete file;
-}
-
-void ctf_fs_file_deleter::operator()(ctf_fs_file * const file) noexcept
-{
-    ctf_fs_file_destroy(file);
-}
-
 ctf_fs_file::UP ctf_fs_file_create(const bt2c::Logger& parentLogger)
 {
-    return ctf_fs_file::UP {new ctf_fs_file {parentLogger}};
+    return bt2s::make_unique<ctf_fs_file>(parentLogger);
 }
 
 int ctf_fs_file_open(struct ctf_fs_file *file, const char *mode)
This page took 0.03805 seconds and 4 git commands to generate.