From 254a2dcb6eb70d763f6c5b46377ddf1889edb043 Mon Sep 17 00:00:00 2001 From: cryptozoidberg Date: Sun, 23 Feb 2020 06:26:12 +0100 Subject: [PATCH] fixed compilation issues with windows/warning for paindroid --- .../epee/include/storages/portable_storage_to_bin.h | 4 ++-- src/wallet/plain_wallet_api.cpp | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/contrib/epee/include/storages/portable_storage_to_bin.h b/contrib/epee/include/storages/portable_storage_to_bin.h index 761d0874..97c5cd50 100644 --- a/contrib/epee/include/storages/portable_storage_to_bin.h +++ b/contrib/epee/include/storages/portable_storage_to_bin.h @@ -37,7 +37,7 @@ namespace epee { template - size_t pack_varint_t(t_stream& strm, uint8_t type_or, size_t& pv) + size_t pack_varint_t(t_stream& strm, uint8_t type_or, const uint64_t& pv) { pack_value v = (*((pack_value*)&pv)) << 2; v |= type_or; @@ -48,7 +48,7 @@ namespace epee PUSH_GCC_WARNINGS DISABLE_GCC_WARNING(strict-aliasing) template - size_t pack_varint(t_stream& strm, size_t val) + size_t pack_varint(t_stream& strm, uint64_t val) { //the first two bits always reserved for size information if(val <= 63) diff --git a/src/wallet/plain_wallet_api.cpp b/src/wallet/plain_wallet_api.cpp index 58d83782..a4a681b3 100644 --- a/src/wallet/plain_wallet_api.cpp +++ b/src/wallet/plain_wallet_api.cpp @@ -14,9 +14,11 @@ std::atomic initialized(false); #define ANDROID_PACKAGE_NAME "com.zano_mobile" #ifdef IOS_BUILD -#define HOME_FOLDER "Documents" + #define HOME_FOLDER "Documents" #elif ANDROID_BUILD -#define HOME_FOLDER "files" + #define HOME_FOLDER "files" +#else + #define HOME_FOLDER "" #endif #define WALLETS_FOLDER_NAME "wallets" @@ -48,9 +50,10 @@ namespace plain_wallet { #ifdef WIN32 return ""; -#endif // WIN32 +#else std::string path = get_bundle_root_dir() + "/" + HOME_FOLDER + "/" + WALLETS_FOLDER_NAME + "/"; return path; +#endif // WIN32 } void initialize_logs() @@ -157,7 +160,6 @@ namespace plain_wallet } gwm.run_wallet(ok_response.result.wallet_id); return epee::serialization::store_t_to_json(ok_response); - return; } error_response err_result = AUTO_VAL_INIT(err_result); err_result.error.code = rsp;