mirror of
https://github.com/vicliu624/trail-mate.git
synced 2026-10-27 07:22:49 +00:00
style: apply clang-format 14
This commit is contained in:
1 parent
dfb08cc2bc
commit
35a12e1e1d
11 files changed
+30
-28
No files matched your search
@@ -22,8 +22,8 @@
|
||||
#endif
|
||||
#include "ui/screens/settings/settings_page_shell.h"
|
||||
#if !defined(TRAIL_MATE_ENABLE_SSTV) || TRAIL_MATE_ENABLE_SSTV
|
||||
#include "ui/screens/sstv/sstv_page_shell.h"
|
||||
#include "ui/screens/sstv/sstv_page_runtime.h"
|
||||
#include "ui/screens/sstv/sstv_page_shell.h"
|
||||
#endif
|
||||
#if !defined(GAT562_NO_TEAM) || !GAT562_NO_TEAM
|
||||
#include "ui/screens/team/team_page_shell.h"
|
||||
|
||||
@@ -546,7 +546,8 @@ bool parse_manifest_file(const std::string& path, Manifest& out)
|
||||
{
|
||||
out.clear();
|
||||
|
||||
const bool read_ok = ::ui::fs::read_text_file_lines(path.c_str(), [&out](std::string& line) {
|
||||
const bool read_ok = ::ui::fs::read_text_file_lines(path.c_str(), [&out](std::string& line)
|
||||
{
|
||||
trim_in_place(line);
|
||||
|
||||
if (!line.empty() && line[0] != '#' && line[0] != ';')
|
||||
@@ -562,8 +563,7 @@ bool parse_manifest_file(const std::string& path, Manifest& out)
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
});
|
||||
return true; });
|
||||
|
||||
return read_ok && !out.empty();
|
||||
}
|
||||
@@ -824,7 +824,8 @@ bool parse_ranges_file(const std::string& path, std::vector<CodepointRange>& out
|
||||
{
|
||||
out.clear();
|
||||
|
||||
const bool read_ok = ::ui::fs::read_text_file_lines(path.c_str(), [&out](std::string& line) {
|
||||
const bool read_ok = ::ui::fs::read_text_file_lines(path.c_str(), [&out](std::string& line)
|
||||
{
|
||||
std::size_t token_start = 0;
|
||||
while (token_start <= line.size())
|
||||
{
|
||||
@@ -842,8 +843,7 @@ bool parse_ranges_file(const std::string& path, std::vector<CodepointRange>& out
|
||||
}
|
||||
token_start = token_end + 1U;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
return true; });
|
||||
|
||||
normalize_ranges(out);
|
||||
return read_ok && !out.empty();
|
||||
@@ -2141,7 +2141,8 @@ bool parse_locale_strings(const std::string& path,
|
||||
{
|
||||
out.clear();
|
||||
|
||||
const bool read_ok = ::ui::fs::read_text_file_lines(path.c_str(), [&out](std::string& line) {
|
||||
const bool read_ok = ::ui::fs::read_text_file_lines(path.c_str(), [&out](std::string& line)
|
||||
{
|
||||
if (!line.empty() && line[0] != '#')
|
||||
{
|
||||
const std::size_t sep = line.find('\t');
|
||||
@@ -2155,8 +2156,7 @@ bool parse_locale_strings(const std::string& path,
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
});
|
||||
return true; });
|
||||
|
||||
std::sort(out.begin(),
|
||||
out.end(),
|
||||
|
||||
@@ -1088,7 +1088,8 @@ bool load_gpx_track_points(const char* path, std::vector<TrackOverlayPoint>& out
|
||||
}
|
||||
|
||||
out.reserve(kMaxTrackOverlayPoints);
|
||||
const bool read_ok = read_track_file_lines(path, [&out](const std::string& line) {
|
||||
const bool read_ok = read_track_file_lines(path, [&out](const std::string& line)
|
||||
{
|
||||
if (line.find("<trkpt") != std::string::npos)
|
||||
{
|
||||
double lat = 0.0;
|
||||
@@ -1097,8 +1098,7 @@ bool load_gpx_track_points(const char* path, std::vector<TrackOverlayPoint>& out
|
||||
{
|
||||
append_track_point(out, lat, lon);
|
||||
}
|
||||
}
|
||||
});
|
||||
} });
|
||||
return read_ok && !out.empty();
|
||||
}
|
||||
|
||||
@@ -1111,7 +1111,8 @@ bool load_csv_track_points(const char* path, std::vector<TrackOverlayPoint>& out
|
||||
}
|
||||
|
||||
out.reserve(kMaxTrackOverlayPoints);
|
||||
const bool read_ok = read_track_file_lines(path, [&out](std::string line) {
|
||||
const bool read_ok = read_track_file_lines(path, [&out](std::string line)
|
||||
{
|
||||
line = trim_copy(std::move(line));
|
||||
if (!line.empty())
|
||||
{
|
||||
@@ -1135,8 +1136,7 @@ bool load_csv_track_points(const char* path, std::vector<TrackOverlayPoint>& out
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
} });
|
||||
return read_ok && !out.empty();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user