From 85b14fd073902d9bee5e13f3ad79ab9c8757d12a Mon Sep 17 00:00:00 2001 From: h-ohta Date: Wed, 17 Aug 2022 15:10:34 +0900 Subject: [PATCH] refactor(tier4_datetime_rviz_plugin): apply clang-tidy --- .../src/autoware_datetime_panel.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/tier4_datetime_rviz_plugin/src/autoware_datetime_panel.cpp b/common/tier4_datetime_rviz_plugin/src/autoware_datetime_panel.cpp index e2c6be4d00a60..dcad2ce7a1b55 100644 --- a/common/tier4_datetime_rviz_plugin/src/autoware_datetime_panel.cpp +++ b/common/tier4_datetime_rviz_plugin/src/autoware_datetime_panel.cpp @@ -25,7 +25,7 @@ void setFormatTime(QLineEdit * line, double time) { char buffer[128]; - time_t seconds = static_cast(time); + auto seconds = static_cast(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)); } @@ -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); }