Fix builds with older gcc versions (at least 5.4.0)

This commit is contained in:
Lee Clagett 2020-09-05 18:47:15 -04:00
parent b1c61c5e81
commit 15ab3e48ed
4 changed files with 19 additions and 3 deletions

View file

@ -29,6 +29,10 @@
cmake_minimum_required(VERSION 3.1.0)
project(monero-lws)
enable_language(CXX)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(MONERO_LIBRARIES
daemon_messages
serialization

View file

@ -141,7 +141,7 @@ namespace lws
if (!user)
return user.error();
response resp{.rates = {common_error::kInvalidArgument}};
response resp{};
auto outputs = user->second.get_outputs(user->first.id);
if (!outputs)

View file

@ -43,7 +43,7 @@ namespace rpc
unsigned id;
const char* method; //!< Must be in static memory
};
const char json_request_base::jsonrpc[];
constexpr const char json_request_base::jsonrpc[];
//! \tparam W implements the WRITE concept \tparam M implements the METHOD concept
template<typename W, typename M>

View file

@ -76,7 +76,19 @@ namespace rpc
struct get_address_info_response
{
get_address_info_response() = delete;
get_address_info_response() noexcept
: locked_funds(safe_uint64(0)),
total_received(safe_uint64(0)),
total_sent(safe_uint64(0)),
scanned_height(0),
scanned_block_height(0),
start_height(0),
transaction_height(0),
blockchain_height(0),
spent_outputs(),
rates(common_error::kInvalidArgument)
{}
safe_uint64 locked_funds;
safe_uint64 total_received;
safe_uint64 total_sent;