Format all C++ and Java code via clang-format

Signed-off-by: Konstantin Pastbin <konstantin.pastbin@gmail.com>
This commit is contained in:
Konstantin Pastbin
2025-08-17 14:32:37 +07:00
parent 9f0290c0ec
commit bfffa1fff4
2169 changed files with 56441 additions and 64188 deletions

View File

@@ -51,19 +51,17 @@ DEFINE_string_ext(output_dir, "", "output dir for gpx files");
DEFINE_string_ext(mwm, "", "short mwm name");
DEFINE_string_ext(user, "", "user id");
DEFINE_int32(track, -1, "track index");
DEFINE_string(
input_distribution, "",
"path to input data point distribution file. It's a csv file with data point count for "
"some mwms. Usage:\n"
"- It may be used with match and match_dir command. If so it's a path to save file with "
"data point distribution by mwm. If it's empty no file is saved.\n"
"- It may be used with balance_csv command. If so it's a path of a file with distribution which "
"will be used for normalization (balancing) the result of the command. It should not be empty.");
DEFINE_uint64(
ignore_datapoints_number, 100,
"The number of datapoints in an mwm to exclude the mwm from balancing process. If this number "
"of datapoints or less number is in an mwm after matching and tabling, the mwm will not used "
"for balancing. This param should be used with balance_csv command.");
DEFINE_string(input_distribution, "",
"path to input data point distribution file. It's a csv file with data point count for "
"some mwms. Usage:\n"
"- It may be used with match and match_dir command. If so it's a path to save file with "
"data point distribution by mwm. If it's empty no file is saved.\n"
"- It may be used with balance_csv command. If so it's a path of a file with distribution which "
"will be used for normalization (balancing) the result of the command. It should not be empty.");
DEFINE_uint64(ignore_datapoints_number, 100,
"The number of datapoints in an mwm to exclude the mwm from balancing process. If this number "
"of datapoints or less number is in an mwm after matching and tabling, the mwm will not used "
"for balancing. This param should be used with balance_csv command.");
DEFINE_string(track_extension, ".track", "track files extension");
DEFINE_bool(no_world_logs, false, "don't print world summary logs");
@@ -86,7 +84,8 @@ size_t Checked_track()
StringFilter MakeFilter(string const & filter)
{
return [&](string const & value) {
return [&](string const & value)
{
if (filter.empty())
return false;
return value != filter;
@@ -97,8 +96,7 @@ StringFilter MakeFilter(string const & filter)
namespace track_analyzing
{
// Print the specified track in C++ form that you can copy paste to C++ source for debugging.
void CmdCppTrack(string const & trackFile, string const & mwmName, string const & user,
size_t trackIdx);
void CmdCppTrack(string const & trackFile, string const & mwmName, string const & user, size_t trackIdx);
// Match raw gps logs to tracks.
void CmdMatch(string const & logFile, string const & trackFile, string const & inputDistribution);
// The same as match but applies for the directory with raw logs.
@@ -106,15 +104,13 @@ void CmdMatchDir(string const & logDir, string const & trackExt, string const &
// Parse |logFile| and save tracks (mwm name, aloha id, lats, lons, timestamps in seconds in csv).
void CmdUnmatchedTracks(string const & logFile, string const & trackFileCsv);
// Print aggregated tracks to csv table.
void CmdTagsTable(string const & filepath, string const & trackExtension,
StringFilter mwmIsFiltered, StringFilter userFilter);
void CmdTagsTable(string const & filepath, string const & trackExtension, StringFilter mwmIsFiltered,
StringFilter userFilter);
// Print track information.
void CmdTrack(string const & trackFile, string const & mwmName, string const & user,
size_t trackIdx);
void CmdTrack(string const & trackFile, string const & mwmName, string const & user, size_t trackIdx);
// Print tracks statistics.
void CmdTracks(string const & filepath, string const & trackExtension, StringFilter mwmFilter,
StringFilter userFilter, TrackFilter const & filter, bool noTrackLogs,
bool noMwmLogs, bool noWorldLogs);
void CmdTracks(string const & filepath, string const & trackExtension, StringFilter mwmFilter, StringFilter userFilter,
TrackFilter const & filter, bool noTrackLogs, bool noMwmLogs, bool noWorldLogs);
void CmdGPX(string const & logFile, string const & outputFilesDir, string const & userID);
} // namespace track_analyzing
@@ -145,10 +141,10 @@ int main(int argc, char ** argv)
}
else if (cmd == "tracks")
{
TrackFilter const filter(FLAGS_min_duration, FLAGS_min_length, FLAGS_min_speed,
FLAGS_max_speed, FLAGS_ignore_traffic);
CmdTracks(Checked_in(), FLAGS_track_extension, MakeFilter(FLAGS_mwm), MakeFilter(FLAGS_user),
filter, FLAGS_no_track_logs, FLAGS_no_mwm_logs, FLAGS_no_world_logs);
TrackFilter const filter(FLAGS_min_duration, FLAGS_min_length, FLAGS_min_speed, FLAGS_max_speed,
FLAGS_ignore_traffic);
CmdTracks(Checked_in(), FLAGS_track_extension, MakeFilter(FLAGS_mwm), MakeFilter(FLAGS_user), filter,
FLAGS_no_track_logs, FLAGS_no_mwm_logs, FLAGS_no_world_logs);
}
else if (cmd == "track")
{
@@ -160,8 +156,7 @@ int main(int argc, char ** argv)
}
else if (cmd == "table")
{
CmdTagsTable(Checked_in(), FLAGS_track_extension, MakeFilter(FLAGS_mwm),
MakeFilter(FLAGS_user));
CmdTagsTable(Checked_in(), FLAGS_track_extension, MakeFilter(FLAGS_mwm), MakeFilter(FLAGS_user));
}
else if (cmd == "balance_csv")
{
@@ -171,8 +166,7 @@ int main(int argc, char ** argv)
"distribution. Hint: this file may be saved by match or match_dir command."));
return 1;
}
CmdBalanceCsv(FLAGS_in, FLAGS_input_distribution,
base::checked_cast<uint64_t>(FLAGS_ignore_datapoints_number));
CmdBalanceCsv(FLAGS_in, FLAGS_input_distribution, base::checked_cast<uint64_t>(FLAGS_ignore_datapoints_number));
}
else if (cmd == "gpx")
{