Skip to content

Commit 2c003be

Browse files
authored
gcc 4.9 and 5 versions failed compilation during the [conan update PR for 4.1.0 version](conan-io/conan-center-index#5468) . These fixes make the project compile for older gcc versions 4.9 and 5 properly. (#872)
1 parent c3ecfcc commit 2c003be

File tree

4 files changed

+7
-13
lines changed

4 files changed

+7
-13
lines changed

hazelcast/include/hazelcast/client/spi/impl/ClientPartitionServiceImpl.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,7 @@ namespace hazelcast {
6464
void reset();
6565
private:
6666
struct partition_table {
67-
partition_table(int32_t connectionId = 0, int32_t version = -1,
68-
const std::unordered_map<int32_t, boost::uuids::uuid> &partitions = {});
69-
70-
int32_t connection_id{0};
67+
int32_t connection_id;
7168
int32_t version;
7269
std::unordered_map<int32_t, boost::uuids::uuid> partitions;
7370
};

hazelcast/src/hazelcast/client/config.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,7 @@ namespace hazelcast {
856856
return it->second;
857857
}
858858

859-
return reliable_topic_config_map_.emplace(name, name).first->second;
859+
return reliable_topic_config_map_.emplace(name, config::reliable_topic_config{name}).first->second;
860860
}
861861

862862
const config::reliable_topic_config *client_config::lookup_reliable_topic_config(const std::string &name) const {

hazelcast/src/hazelcast/client/discovery.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@ namespace hazelcast {
588588

589589
std::unordered_map<address, address> aws_client::get_addresses() {
590590
util::Preconditions::check_ssl("aws_client::get_addresses");
591-
return {};
591+
return std::unordered_map<address, address>();
592592
}
593593
}
594594
}

hazelcast/src/hazelcast/client/spi.cpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -788,9 +788,10 @@ namespace hazelcast {
788788
auto previous_list = member_list_snapshot_.load()->members;
789789

790790
member_list_snapshot_.store(
791-
boost::shared_ptr<member_list_snapshot>(new member_list_snapshot{0, {}}));
791+
boost::shared_ptr<member_list_snapshot>(new member_list_snapshot{0}));
792792

793-
return detect_membership_events(previous_list, {});
793+
return detect_membership_events(previous_list,
794+
std::unordered_map<boost::uuids::uuid, member, boost::hash<boost::uuids::uuid>>());
794795
}
795796

796797
void ClientClusterServiceImpl::clear_member_list() {
@@ -2357,7 +2358,7 @@ namespace hazelcast {
23572358
}
23582359
#else
23592360
util::Preconditions::check_ssl("cloud_discovery::get_addresses");
2360-
return {};
2361+
return std::unordered_map<address, address>();
23612362
#endif
23622363
}
23632364

@@ -2388,10 +2389,6 @@ namespace hazelcast {
23882389
return address(std::move(scoped_hostname), address_holder.get_port());
23892390
}
23902391
}
2391-
2392-
ClientPartitionServiceImpl::partition_table::partition_table(int32_t connectionId, int32_t version,
2393-
const std::unordered_map<int32_t, boost::uuids::uuid> &partitions)
2394-
: connection_id(connectionId), version(version), partitions(partitions) {}
23952392
}
23962393
}
23972394
}

0 commit comments

Comments
 (0)