mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-03-11 19:45:20 +00:00
fix(Build/Deps): Increase minimal Boost versions and remove old compatibilities (#20287)
* fix(Core/Common): remove conditions for unsupported boost versions * fix Cmake version requiert acording to wiki
This commit is contained in:
@@ -35,23 +35,12 @@ namespace Acore::Asio
|
||||
Optional<boost::asio::ip::tcp::endpoint> Resolve(boost::asio::ip::tcp const& protocol, std::string const& host, std::string const& service)
|
||||
{
|
||||
boost::system::error_code ec;
|
||||
#if BOOST_VERSION >= 106600
|
||||
boost::asio::ip::resolver_base::flags flagsResolver = boost::asio::ip::resolver_base::all_matching;
|
||||
boost::asio::ip::tcp::resolver::results_type results = _impl.resolve(protocol, host, service, flagsResolver, ec);
|
||||
if (results.begin() == results.end() || ec)
|
||||
return {};
|
||||
|
||||
return results.begin()->endpoint();
|
||||
#else
|
||||
boost::asio::ip::resolver_query_base::flags flagsQuery = boost::asio::ip::tcp::resolver::query::all_matching;
|
||||
boost::asio::ip::tcp::resolver::query query(std::move(protocol), std::move(host), std::move(service), flagsQuery);
|
||||
boost::asio::ip::tcp::resolver::iterator itr = _impl.resolve(query, ec);
|
||||
boost::asio::ip::tcp::resolver::iterator end;
|
||||
if (itr == end || ec)
|
||||
return {};
|
||||
|
||||
return itr->endpoint();
|
||||
#endif
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user