mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-20 13:23:59 +00:00
Format all C++ and Java code via clang-format
Signed-off-by: Konstantin Pastbin <konstantin.pastbin@gmail.com>
This commit is contained in:
@@ -25,7 +25,6 @@
|
||||
#include <thread>
|
||||
#include <tuple>
|
||||
|
||||
|
||||
namespace routing
|
||||
{
|
||||
namespace routes_builder
|
||||
@@ -63,14 +62,9 @@ routing::VehicleType ConvertVehicleTypeFromString(std::string const & str)
|
||||
}
|
||||
} // namespace
|
||||
|
||||
void BuildRoutes(std::string const & routesPath,
|
||||
std::string const & dumpPath,
|
||||
uint64_t startFrom,
|
||||
uint64_t threadsNumber,
|
||||
uint32_t timeoutPerRouteSeconds,
|
||||
std::string const & vehicleTypeStr,
|
||||
bool verbose,
|
||||
uint32_t launchesNumber)
|
||||
void BuildRoutes(std::string const & routesPath, std::string const & dumpPath, uint64_t startFrom,
|
||||
uint64_t threadsNumber, uint32_t timeoutPerRouteSeconds, std::string const & vehicleTypeStr,
|
||||
bool verbose, uint32_t launchesNumber)
|
||||
{
|
||||
CHECK(Platform::IsFileExistsByFullPath(routesPath), ("Can not find file:", routesPath));
|
||||
CHECK(!dumpPath.empty(), ("Empty dumpPath."));
|
||||
@@ -132,8 +126,7 @@ void BuildRoutes(std::string const & routesPath,
|
||||
|
||||
RoutesBuilder::Result::Dump(result, fullPath);
|
||||
|
||||
double const curPercent =
|
||||
static_cast<double>(shiftIndex + 1) / (tasks.size() + startFrom) * 100.0;
|
||||
double const curPercent = static_cast<double>(shiftIndex + 1) / (tasks.size() + startFrom) * 100.0;
|
||||
|
||||
if (curPercent - lastPercent > 1.0 || shiftIndex + 1 == tasks.size())
|
||||
{
|
||||
@@ -165,10 +158,8 @@ std::optional<std::tuple<ms::LatLon, ms::LatLon, int32_t>> ParseApiLine(std::ifs
|
||||
return {{start, finish, utcOffset}};
|
||||
}
|
||||
|
||||
void BuildRoutesWithApi(std::unique_ptr<api::RoutingApi> routingApi,
|
||||
std::string const & routesPath,
|
||||
std::string const & dumpPath,
|
||||
int64_t startFrom)
|
||||
void BuildRoutesWithApi(std::unique_ptr<api::RoutingApi> routingApi, std::string const & routesPath,
|
||||
std::string const & dumpPath, int64_t startFrom)
|
||||
{
|
||||
std::ifstream input(routesPath);
|
||||
CHECK(input.good(), ("Error during opening:", routesPath));
|
||||
@@ -188,7 +179,8 @@ void BuildRoutesWithApi(std::unique_ptr<api::RoutingApi> routingApi,
|
||||
return ms;
|
||||
};
|
||||
|
||||
auto const drop = [&]() {
|
||||
auto const drop = [&]()
|
||||
{
|
||||
rps = 0;
|
||||
timer.Reset();
|
||||
};
|
||||
@@ -271,8 +263,7 @@ void BuildRoutesWithApi(std::unique_ptr<api::RoutingApi> routingApi,
|
||||
dump();
|
||||
}
|
||||
|
||||
std::unique_ptr<routing_quality::api::RoutingApi> CreateRoutingApi(std::string const & name,
|
||||
std::string const & token)
|
||||
std::unique_ptr<routing_quality::api::RoutingApi> CreateRoutingApi(std::string const & name, std::string const & token)
|
||||
{
|
||||
if (name == "mapbox")
|
||||
return std::make_unique<routing_quality::api::mapbox::MapboxApi>(token);
|
||||
@@ -283,4 +274,4 @@ std::unique_ptr<routing_quality::api::RoutingApi> CreateRoutingApi(std::string c
|
||||
UNREACHABLE();
|
||||
}
|
||||
} // namespace routes_builder
|
||||
} // routing
|
||||
} // namespace routing
|
||||
|
||||
Reference in New Issue
Block a user