Skip to content

Commit 21696a5

Browse files
author
Tyler Zhao
committed
Clang format
1 parent 0d318d7 commit 21696a5

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/acl_hal_mmd.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -464,13 +464,12 @@ static void my_dlclose_no_assert(void *library) {
464464
}
465465

466466
typedef struct my_dl_wrapper {
467-
void* handle;
468-
my_dl_wrapper(void* handle) {
469-
this->handle = handle;
470-
}
471-
~my_dl_wrapper() {
472-
my_dlclose_no_assert(this->handle);
473-
}
467+
void *handle;
468+
my_dl_wrapper(void *handle) { this->handle = handle; }
469+
~my_dl_wrapper() { my_dlclose_no_assert(this->handle); }
470+
// prohibit copying to avoid double-close of handle
471+
my_dl_wrapper(const my_dl_wrapper &) = delete;
472+
my_dl_wrapper &operator=(const my_dl_wrapper &) = delete;
474473
} my_dl_wrapper;
475474
std::vector<std::unique_ptr<my_dl_wrapper>> mmd_libs;
476475

0 commit comments

Comments
 (0)