fix crash
This commit is contained in:
@@ -245,16 +245,17 @@ private: \
|
||||
|
||||
#define E_SUBSCRIBE(name, callback) \
|
||||
event_consumers_.emplace_back(std::make_shared<repertory::event_consumer>( \
|
||||
#name, [this](const event &e) { callback(e); }))
|
||||
#name, [this](const event &evt) { callback(evt); }))
|
||||
|
||||
#define E_SUBSCRIBE_EXACT(name, callback) \
|
||||
event_consumers_.emplace_back(std::make_shared<repertory::event_consumer>( \
|
||||
#name, \
|
||||
[this](const event &e) { callback(dynamic_cast<const name &>(e)); }))
|
||||
#name, [this](const event &evt) { \
|
||||
callback(dynamic_cast<const name &>(evt)); \
|
||||
}))
|
||||
|
||||
#define E_SUBSCRIBE_ALL(callback) \
|
||||
event_consumers_.emplace_back(std::make_shared<repertory::event_consumer>( \
|
||||
[this](const event &e) { callback(e); }))
|
||||
[this](const event &evt) { callback(evt); }))
|
||||
} // namespace repertory
|
||||
|
||||
#endif // INCLUDE_EVENTS_EVENT_SYSTEM_HPP_
|
||||
|
@@ -470,8 +470,8 @@ private:
|
||||
|
||||
auto open(const std::string &api_path, bool directory,
|
||||
const open_file_data &ofd, std::uint64_t &handle,
|
||||
std::shared_ptr<i_open_file> &f,
|
||||
std::shared_ptr<i_closeable_open_file> of) -> api_error;
|
||||
std::shared_ptr<i_open_file> &file,
|
||||
std::shared_ptr<i_closeable_open_file> closeable_file) -> api_error;
|
||||
|
||||
void queue_upload(const std::string &api_path, const std::string &source_path,
|
||||
bool no_lock);
|
||||
@@ -480,7 +480,7 @@ private:
|
||||
|
||||
void swap_renamed_items(std::string from_api_path, std::string to_api_path);
|
||||
|
||||
void upload_completed(const file_upload_completed &e);
|
||||
void upload_completed(const file_upload_completed &evt);
|
||||
|
||||
void upload_handler();
|
||||
|
||||
@@ -490,14 +490,14 @@ public:
|
||||
auto handle_file_rename(const std::string &from_api_path,
|
||||
const std::string &to_api_path) -> api_error;
|
||||
|
||||
void queue_upload(const i_open_file &o) override;
|
||||
void queue_upload(const i_open_file &file) override;
|
||||
|
||||
void remove_resume(const std::string &api_path,
|
||||
const std::string &source_path) override;
|
||||
|
||||
void remove_upload(const std::string &api_path) override;
|
||||
|
||||
void store_resume(const i_open_file &o) override;
|
||||
void store_resume(const i_open_file &file) override;
|
||||
|
||||
public:
|
||||
void close(std::uint64_t handle);
|
||||
@@ -506,7 +506,7 @@ public:
|
||||
|
||||
[[nodiscard]] auto create(const std::string &api_path, api_meta_map &meta,
|
||||
open_file_data ofd, std::uint64_t &handle,
|
||||
std::shared_ptr<i_open_file> &f) -> api_error;
|
||||
std::shared_ptr<i_open_file> &file) -> api_error;
|
||||
|
||||
[[nodiscard]] auto evict_file(const std::string &api_path) -> bool override;
|
||||
|
||||
@@ -514,7 +514,7 @@ public:
|
||||
-> directory_item_list override;
|
||||
|
||||
[[nodiscard]] auto get_open_file(std::uint64_t handle, bool write_supported,
|
||||
std::shared_ptr<i_open_file> &f) -> bool;
|
||||
std::shared_ptr<i_open_file> &file) -> bool;
|
||||
|
||||
[[nodiscard]] auto get_open_file_count() const -> std::size_t;
|
||||
|
||||
@@ -533,11 +533,11 @@ public:
|
||||
#ifdef REPERTORY_TESTING
|
||||
[[nodiscard]] auto open(std::shared_ptr<i_closeable_open_file> of,
|
||||
const open_file_data &ofd, std::uint64_t &handle,
|
||||
std::shared_ptr<i_open_file> &f) -> api_error;
|
||||
std::shared_ptr<i_open_file> &file) -> api_error;
|
||||
#endif
|
||||
[[nodiscard]] auto open(const std::string &api_path, bool directory,
|
||||
const open_file_data &ofd, std::uint64_t &handle,
|
||||
std::shared_ptr<i_open_file> &f) -> api_error;
|
||||
std::shared_ptr<i_open_file> &file) -> api_error;
|
||||
|
||||
[[nodiscard]] auto remove_file(const std::string &api_path) -> api_error;
|
||||
|
||||
|
Reference in New Issue
Block a user