16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-21 11:19:19 +02:00

reformat: remove redundant parentheses

This commit is contained in:
jerrrrycho
2026-07-04 05:39:03 +02:00
parent cf9fb07800
commit 31f9ca0afc
9 changed files with 57 additions and 39 deletions

View File

@@ -46,7 +46,7 @@ void trainingcard_panel::clear()
void trainingcard_panel::save_thread_func()
{
std::tm *tm = std::localtime(&(*start_time_wall));
std::tm *tm = std::localtime(&*start_time_wall);
std::string date = std::to_string(tm->tm_year + 1900) + "-" + std::to_string(tm->tm_mon + 1) + "-" + std::to_string(tm->tm_mday);
std::string from = std::to_string(tm->tm_hour) + ":" + std::to_string(tm->tm_min);
std::time_t now = std::time(nullptr);
@@ -62,17 +62,17 @@ void trainingcard_panel::save_thread_func()
const std::string magic("{{CONTENT}}");
if (in_line.compare(0, magic.size(), magic) == 0)
{
temp << "<div><b>Miejsce: </b>" << (std::string(place.c_str())) << "</div><br />" << std::endl;
temp << "<div><b>Data: </b>" << (date) << "</div><br />" << std::endl;
temp << "<div><b>Czas: </b>" << (from) << " - " << (to) << "</div><br />" << std::endl;
temp << "<div><b>Imię (imiona) i nazwisko szkolonego: </b>" << (trainee_name) << "</div><br />" << std::endl;
temp << "<div><b>Data urodzenia: </b>" << (trainee_birthdate) << "</div><br />" << std::endl;
temp << "<div><b>Firma: </b>" << (trainee_company) << "</div><br />" << std::endl;
temp << "<div><b>Imię i nazwisko instruktora: </b>" << (instructor_name) << "</div><br />" << std::endl;
temp << "<div><b>Odcinek trasy: </b>" << (track_segment) << "</div><br />" << std::endl;
temp << "<div><b>Miejsce: </b>" << std::string(place.c_str()) << "</div><br />" << std::endl;
temp << "<div><b>Data: </b>" << date << "</div><br />" << std::endl;
temp << "<div><b>Czas: </b>" << from << " - " << to << "</div><br />" << std::endl;
temp << "<div><b>Imię (imiona) i nazwisko szkolonego: </b>" << trainee_name << "</div><br />" << std::endl;
temp << "<div><b>Data urodzenia: </b>" << trainee_birthdate << "</div><br />" << std::endl;
temp << "<div><b>Firma: </b>" << trainee_company << "</div><br />" << std::endl;
temp << "<div><b>Imię i nazwisko instruktora: </b>" << instructor_name << "</div><br />" << std::endl;
temp << "<div><b>Odcinek trasy: </b>" << track_segment << "</div><br />" << std::endl;
if (distance > 0.0f)
temp << "<div><b>Przebyta odległość: </b>" << std::round(distance) << " km</div><br />" << std::endl;
temp << "<div><b>Uwagi: </b><br />" << (remarks) << "</div>" << std::endl;
temp << "<div><b>Uwagi: </b><br />" << remarks << "</div>" << std::endl;
}
else
{
@@ -121,7 +121,7 @@ void trainingcard_panel::render_contents()
if (start_time_wall)
{
const std::tm *tm = std::localtime(&(*start_time_wall));
const std::tm *tm = std::localtime(&*start_time_wall);
const std::string rep = "Czas rozpoczęcia: " + std::to_string(tm->tm_year + 1900) + "-" + std::to_string(tm->tm_mon + 1) + "-" + std::to_string(tm->tm_mday) + " " + std::to_string(tm->tm_hour) +
":" + std::to_string(tm->tm_min);
ImGui::TextUnformatted(rep.c_str());
@@ -159,7 +159,7 @@ void trainingcard_panel::render_contents()
if (ImGui::Button("Rozpocznij szkolenie"))
{
start_time_wall = std::time(nullptr);
const std::tm *tm = std::localtime(&(*start_time_wall));
const std::tm *tm = std::localtime(&*start_time_wall);
recording_timestamp = std::to_string(tm->tm_year + 1900) + std::to_string(tm->tm_mon + 1) + std::to_string(tm->tm_mday) + std::to_string(tm->tm_hour) + std::to_string(tm->tm_min) + "_" +
std::string(trainee_name.c_str()) + "_" + std::string(instructor_name.c_str());