Skip to content

Commit

Permalink
Init all proms
Browse files Browse the repository at this point in the history
Signed-off-by: Julian Oes <[email protected]>
  • Loading branch information
julianoes committed Oct 27, 2023
1 parent db6cd46 commit 74ac0c8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/mavsdk/plugins/ftp/ftp_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ void FtpImpl::list_directory_async(const std::string& path, Ftp::ListDirectoryCa

Ftp::Result FtpImpl::create_directory(const std::string& path)
{
std::promise<Ftp::Result> prom;
std::promise<Ftp::Result> prom{};
auto fut = prom.get_future();

create_directory_async(path, [&](Ftp::Result result) { prom.set_value(result); });
Expand All @@ -113,7 +113,7 @@ void FtpImpl::create_directory_async(const std::string& path, Ftp::ResultCallbac

Ftp::Result FtpImpl::remove_directory(const std::string& path)
{
std::promise<Ftp::Result> prom;
std::promise<Ftp::Result> prom{};
auto fut = prom.get_future();

remove_directory_async(path, [&](Ftp::Result result) { prom.set_value(result); });
Expand Down Expand Up @@ -153,7 +153,7 @@ void FtpImpl::remove_file_async(const std::string& path, Ftp::ResultCallback cal

Ftp::Result FtpImpl::rename(const std::string& from_path, const std::string& to_path)
{
std::promise<Ftp::Result> prom;
std::promise<Ftp::Result> prom{};
auto fut = prom.get_future();

rename_async(from_path, to_path, [&](Ftp::Result result) { prom.set_value(result); });
Expand All @@ -174,7 +174,7 @@ void FtpImpl::rename_async(
std::pair<Ftp::Result, bool>
FtpImpl::are_files_identical(const std::string& local_path, const std::string& remote_path)
{
std::promise<std::pair<Ftp::Result, bool>> prom;
std::promise<std::pair<Ftp::Result, bool>> prom{};
auto fut = prom.get_future();

are_files_identical_async(local_path, remote_path, [&](Ftp::Result result, bool identical) {
Expand Down

0 comments on commit 74ac0c8

Please sign in to comment.