From 7ce8669d029c899f3885fcde528081eb21edf18f Mon Sep 17 00:00:00 2001 From: woodser Date: Wed, 4 Mar 2020 10:56:31 -0500 Subject: [PATCH] use boost::optional return type from get_cache_file_data --- src/wallet/monero_wallet_core.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/wallet/monero_wallet_core.cpp b/src/wallet/monero_wallet_core.cpp index 111c54e..f771de2 100644 --- a/src/wallet/monero_wallet_core.cpp +++ b/src/wallet/monero_wallet_core.cpp @@ -3165,10 +3165,9 @@ namespace monero { } std::string monero_wallet_core::get_cache_file_buffer(const epee::wipeable_string& password) const { - wallet2::cache_file_data cache_file_data = {}; - bool r = m_w2->get_cache_file_data(password, cache_file_data); + boost::optional cache_file_data = m_w2->get_cache_file_data(password); std::string buf; - ::serialization::dump_binary(cache_file_data, buf); + ::serialization::dump_binary(cache_file_data.get(), buf); return buf; }