mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-12-01 16:46:39 +00:00
Default initialize before swap in move constructor
Fix #9373, fix #9384, fix #9400, fix #9404
This commit is contained in:
@@ -13,6 +13,7 @@ struct mmap_data : public byte_data {
|
||||
(sizeof(void *) == 4 && BLKGETSIZE64 == 0x80041272));
|
||||
ALLOW_MOVE_ONLY(mmap_data)
|
||||
|
||||
mmap_data() = default;
|
||||
explicit mmap_data(const char *name, bool rw = false);
|
||||
mmap_data(int dirfd, const char *name, bool rw = false);
|
||||
mmap_data(int fd, size_t sz, bool rw = false);
|
||||
|
||||
@@ -15,7 +15,7 @@ clazz(clazz &&) = delete;
|
||||
|
||||
#define ALLOW_MOVE_ONLY(clazz) \
|
||||
clazz(const clazz&) = delete; \
|
||||
clazz(clazz &&o) { swap(o); } \
|
||||
clazz(clazz &&o) : clazz() { swap(o); } \
|
||||
clazz& operator=(clazz &&o) { swap(o); return *this; }
|
||||
|
||||
struct Utf8CStr;
|
||||
|
||||
Reference in New Issue
Block a user