Skip to content

Commit

Permalink
Address style issues
Browse files Browse the repository at this point in the history
Signed-off-by: Luca Della Vedova <lucadv@intrinsic.ai>
  • Loading branch information
luca-della-vedova committed May 29, 2024
1 parent 15585aa commit 51aa78f
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 9 deletions.
3 changes: 2 additions & 1 deletion rmf_traffic_editor/gui/crowd_sim/agent_profile_table.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ void AgentProfileTab::list_item_in_cache()
{
auto current_profile = _cache[i];
setItem(i, 0,
new QTableWidgetItem(QString::fromStdString(current_profile.profile_name)));
new QTableWidgetItem(QString::fromStdString(
current_profile.profile_name)));
setItem(i, 1,
new QTableWidgetItem(QString::number(
static_cast<uint>(current_profile.profile_class))));
Expand Down
11 changes: 6 additions & 5 deletions rmf_traffic_editor/gui/crowd_sim/condition_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,14 @@ ConditionDialog::ConditionDialog(
auto root_condition = _current_transition.get_condition();
if (crowd_sim::Condition::GOAL == root_condition->get_type())
{
auto goal_condition = std::dynamic_pointer_cast<crowd_sim::ConditionGOAL>(
root_condition);
auto goal_condition =
std::dynamic_pointer_cast<crowd_sim::ConditionGOAL>(root_condition);
goal_condition->set_value(temp);
}
if (crowd_sim::Condition::TIMER == root_condition->get_type())
{
auto timer_condition = std::dynamic_pointer_cast<crowd_sim::ConditionTIMER>(
root_condition);
auto timer_condition =
std::dynamic_pointer_cast<crowd_sim::ConditionTIMER>(root_condition);
timer_condition->set_value(temp);
}
}
Expand Down Expand Up @@ -268,7 +268,8 @@ void ConditionDialog::_construct_leaf_condition_widget(
condition_value->setText(QString::number(_condition2ValueD));
std::string condition_label = "condition" + std::to_string(condition_index) +
":";
condition_hbox->addWidget(new QLabel(QString::fromStdString(condition_label) ));
condition_hbox->addWidget(new QLabel(QString::fromStdString(
condition_label) ));
condition_hbox->addWidget(condition_type);
condition_hbox->addWidget(condition_value);
connect(
Expand Down
3 changes: 2 additions & 1 deletion rmf_traffic_editor/gui/crowd_sim/to_state_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ ToStateDialog::ToStateDialog(
_to_state_tab = ToStateTab::init_and_make(crowd_sim_impl, transition);
if (!_to_state_tab)
{
throw std::runtime_error("Failed to initialize ToStateTab in ToStateDialog");
throw std::runtime_error(
"Failed to initialize ToStateTab in ToStateDialog");
}
_to_state_tab->update();
std::string title = "from_state: " + transition.get_from_state();
Expand Down
3 changes: 2 additions & 1 deletion rmf_traffic_editor/gui/editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,8 @@ void Editor::load_model_names()
try
{
share_dir =
ament_index_cpp::get_package_share_directory("rmf_traffic_editor_assets");
ament_index_cpp::get_package_share_directory(
"rmf_traffic_editor_assets");

ament_index_cpp::get_resource("rmf_traffic_editor_assets",
"assets",
Expand Down
3 changes: 2 additions & 1 deletion rmf_traffic_editor/gui/level_table.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ void LevelTable::update(Building& building)
if (dialog.exec() == QDialog::Accepted)
{
building.levels[i].name = ui.name_line_edit->text().toStdString();
building.levels[i].elevation = ui.elevation_line_edit->text().toDouble();
building.levels[i].elevation =
ui.elevation_line_edit->text().toDouble();
setWindowModified(true); // not sure why, but this doesn't work
}
}
Expand Down

0 comments on commit 51aa78f

Please sign in to comment.