mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 04:53:36 +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:
@@ -19,7 +19,9 @@ using namespace feature;
|
||||
namespace generator
|
||||
{
|
||||
WikiUrlDumper::WikiUrlDumper(std::string const & path, std::vector<std::string> const & dataFiles)
|
||||
: m_path(path), m_dataFiles(dataFiles) {}
|
||||
: m_path(path)
|
||||
, m_dataFiles(dataFiles)
|
||||
{}
|
||||
|
||||
void WikiUrlDumper::Dump(size_t cpuCount) const
|
||||
{
|
||||
@@ -29,7 +31,8 @@ void WikiUrlDumper::Dump(size_t cpuCount) const
|
||||
std::vector<std::future<std::string>> futures;
|
||||
futures.reserve(m_dataFiles.size());
|
||||
|
||||
auto const fn = [](std::string const & filename) {
|
||||
auto const fn = [](std::string const & filename)
|
||||
{
|
||||
std::stringstream stringStream;
|
||||
DumpOne(filename, stringStream);
|
||||
return stringStream.str();
|
||||
@@ -55,21 +58,23 @@ void WikiUrlDumper::Dump(size_t cpuCount) const
|
||||
// static
|
||||
void WikiUrlDumper::DumpOne(std::string const & path, std::ostream & stream)
|
||||
{
|
||||
//auto const & needWikiUrl = ftypes::AttractionsChecker::Instance();
|
||||
feature::ForEachFeatureRawFormat(path, [&](FeatureBuilder const & feature, uint64_t /* pos */) {
|
||||
// if (!needWikiUrl(feature.GetTypesHolder()))
|
||||
// return;
|
||||
// auto const & needWikiUrl = ftypes::AttractionsChecker::Instance();
|
||||
feature::ForEachFeatureRawFormat(path, [&](FeatureBuilder const & feature, uint64_t /* pos */)
|
||||
{
|
||||
// if (!needWikiUrl(feature.GetTypesHolder()))
|
||||
// return;
|
||||
|
||||
auto const wikiUrl = feature.GetMetadata().GetWikiURL();
|
||||
if (wikiUrl.empty())
|
||||
return;
|
||||
|
||||
stream << path << "\t" << feature.GetMostGenericOsmId() << "\t" << wikiUrl << "\n";
|
||||
stream << path << "\t" << feature.GetMostGenericOsmId() << "\t" << wikiUrl << "\n";
|
||||
});
|
||||
}
|
||||
|
||||
WikiDataFilter::WikiDataFilter(std::string const & path, std::vector<std::string> const & dataFiles)
|
||||
: m_path(path), m_dataFiles(dataFiles)
|
||||
: m_path(path)
|
||||
, m_dataFiles(dataFiles)
|
||||
{
|
||||
std::ifstream stream(m_path);
|
||||
if (!stream)
|
||||
@@ -89,10 +94,11 @@ WikiDataFilter::WikiDataFilter(std::string const & path, std::vector<std::string
|
||||
void WikiDataFilter::FilterOne(std::string const & path, std::map<base::GeoObjectId, std::string> const & idToWikiData,
|
||||
std::ostream & stream)
|
||||
{
|
||||
//auto const & needWikiUrl = ftypes::AttractionsChecker::Instance();
|
||||
feature::ForEachFeatureRawFormat(path, [&](FeatureBuilder const & feature, uint64_t /* pos */) {
|
||||
// if (!needWikiUrl(feature.GetTypesHolder()))
|
||||
// return;
|
||||
// auto const & needWikiUrl = ftypes::AttractionsChecker::Instance();
|
||||
feature::ForEachFeatureRawFormat(path, [&](FeatureBuilder const & feature, uint64_t /* pos */)
|
||||
{
|
||||
// if (!needWikiUrl(feature.GetTypesHolder()))
|
||||
// return;
|
||||
|
||||
auto const it = idToWikiData.find(feature.GetMostGenericOsmId());
|
||||
if (it == std::end(idToWikiData))
|
||||
@@ -110,7 +116,8 @@ void WikiDataFilter::Filter(size_t cpuCount)
|
||||
std::vector<std::future<std::string>> futures;
|
||||
futures.reserve(m_dataFiles.size());
|
||||
|
||||
auto const fn = [&](std::string const & filename) {
|
||||
auto const fn = [&](std::string const & filename)
|
||||
{
|
||||
std::stringstream stringStream;
|
||||
FilterOne(filename, m_idToWikiData, stringStream);
|
||||
return stringStream.str();
|
||||
|
||||
Reference in New Issue
Block a user