Skip to content

Commit

Permalink
refactor(tier4_datetime_rviz_plugin): apply clang-tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
h-ohta committed Aug 17, 2022
1 parent d20e079 commit 85b14fd
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
void setFormatTime(QLineEdit * line, double time)
{
char buffer[128];
time_t seconds = static_cast<time_t>(time);
auto seconds = static_cast<time_t>(time);
strftime(buffer, sizeof(buffer), "%Y-%m-%d %H:%M:%S", localtime(&seconds));
line->setText(QString(buffer) + QString::number((time - seconds), 'f', 3).rightRef(4));
}
Expand All @@ -38,14 +38,14 @@ AutowareDateTimePanel::AutowareDateTimePanel(QWidget * parent) : rviz_common::Pa
wall_time_label_ = new QLineEdit;
wall_time_label_->setReadOnly(true);

QHBoxLayout * layout = new QHBoxLayout(this);
auto * layout = new QHBoxLayout(this);
layout->addWidget(new QLabel("ROS Time:"));
layout->addWidget(ros_time_label_);
layout->addWidget(new QLabel("Wall Time:"));
layout->addWidget(wall_time_label_);
setLayout(layout);

QTimer * timer = new QTimer(this);
auto * timer = new QTimer(this);
connect(timer, &QTimer::timeout, this, &AutowareDateTimePanel::update);
timer->start(60);
}
Expand Down

0 comments on commit 85b14fd

Please sign in to comment.