diff --git a/tesseract_command_language/src/composite_instruction.cpp b/tesseract_command_language/src/composite_instruction.cpp index b9d50c7f45b..863b60f8e79 100644 --- a/tesseract_command_language/src/composite_instruction.cpp +++ b/tesseract_command_language/src/composite_instruction.cpp @@ -73,8 +73,8 @@ const std::string& CompositeInstruction::getProfile(const std::string& ns) const { if (ns.empty() || (profile_overrides_.find(ns) == profile_overrides_.end())) return profile_; - else - return profile_overrides_.at(ns); + + return profile_overrides_.at(ns); } void CompositeInstruction::setProfileOverrides(ProfileOverrides profile_overrides) diff --git a/tesseract_command_language/src/move_instruction.cpp b/tesseract_command_language/src/move_instruction.cpp index 06093d21851..b8920563963 100644 --- a/tesseract_command_language/src/move_instruction.cpp +++ b/tesseract_command_language/src/move_instruction.cpp @@ -152,8 +152,8 @@ const std::string& MoveInstruction::getProfile(const std::string& ns) const { if (ns.empty() || (profile_overrides_.find(ns) == profile_overrides_.end())) return profile_; - else - return profile_overrides_.at(ns); + + return profile_overrides_.at(ns); } void MoveInstruction::setPathProfile(const std::string& profile) { path_profile_ = profile; } @@ -161,8 +161,8 @@ const std::string& MoveInstruction::getPathProfile(const std::string& ns) const { if (ns.empty() || (path_profile_overrides_.find(ns) == path_profile_overrides_.end())) return path_profile_; - else - return path_profile_overrides_.at(ns); + + return path_profile_overrides_.at(ns); } void MoveInstruction::setProfileOverrides(ProfileOverrides profile_overrides) diff --git a/tesseract_command_language/test/move_instruction_unit.cpp b/tesseract_command_language/test/move_instruction_unit.cpp index e74b8b764a1..21da7dc3515 100644 --- a/tesseract_command_language/test/move_instruction_unit.cpp +++ b/tesseract_command_language/test/move_instruction_unit.cpp @@ -291,7 +291,7 @@ TEST(TesseractCommandLanguageMoveInstructionPolyUnit, boostSerialization) // NO EXPECT_FALSE(child_ninstr.getParentUUID().is_nil()); } -TEST(TesseractCommandLanguageMoveInstructionPolyUnit, ProfileOverrides) +TEST(TesseractCommandLanguageMoveInstructionPolyUnit, ProfileOverrides) // NOLINT { Eigen::VectorXd jv = Eigen::VectorXd::Ones(6); std::vector jn = { "j1", "j2", "j3", "j4", "j5", "j6" }; diff --git a/tesseract_motion_planners/test/profile_dictionary_tests.cpp b/tesseract_motion_planners/test/profile_dictionary_tests.cpp index 093ee2ae24e..032c476098e 100644 --- a/tesseract_motion_planners/test/profile_dictionary_tests.cpp +++ b/tesseract_motion_planners/test/profile_dictionary_tests.cpp @@ -60,12 +60,12 @@ TEST(TesseractPlanningProfileDictionaryUnit, ProfileDictionaryTest) // NOLINT { ProfileDictionary profiles; - EXPECT_THROW(profiles.getProfile("ns", "key"), std::runtime_error); + EXPECT_THROW(profiles.getProfile("ns", "key"), std::runtime_error); // NOLINT profiles.addProfile("ns", "key", std::make_shared()); ProfileBase::ConstPtr profile; - ASSERT_NO_THROW(profile = profiles.getProfile("ns", "key")); + ASSERT_NO_THROW(profile = profiles.getProfile("ns", "key")); // NOLINT ASSERT_TRUE(profile != nullptr); EXPECT_EQ(profile->a, 0); @@ -73,14 +73,14 @@ TEST(TesseractPlanningProfileDictionaryUnit, ProfileDictionaryTest) // NOLINT // Check add same profile with different key profiles.addProfile("ns", "key2", profile); ProfileBase::ConstPtr profile2; - ASSERT_NO_THROW(profile2 = profiles.getProfile("ns", "key2")); + ASSERT_NO_THROW(profile2 = profiles.getProfile("ns", "key2")); // NOLINT ASSERT_TRUE(profile2 != nullptr); EXPECT_EQ(profile2->a, 0); // Check replacing a profile profiles.addProfile("ns", "key", std::make_shared(10)); ProfileBase::ConstPtr profile_check; - ASSERT_NO_THROW(profile_check = profiles.getProfile("ns", "key")); + ASSERT_NO_THROW(profile_check = profiles.getProfile("ns", "key")); // NOLINT ASSERT_TRUE(profile_check != nullptr); EXPECT_EQ(profile_check->a, 10); @@ -91,7 +91,7 @@ TEST(TesseractPlanningProfileDictionaryUnit, ProfileDictionaryTest) // NOLINT profiles.addProfile("ns", "key", std::make_shared(20)); ProfileBase::ConstPtr profile_check2; - ASSERT_NO_THROW(profile_check2 = profiles.getProfile("ns", "key")); + ASSERT_NO_THROW(profile_check2 = profiles.getProfile("ns", "key")); // NOLINT ASSERT_TRUE(profile_check2 != nullptr); EXPECT_EQ(profile_check2->a, 20); @@ -117,12 +117,12 @@ TEST(TesseractPlanningProfileDictionaryUnit, ProfileDictionaryTest) // NOLINT profiles.addProfile("ns", "key", std::make_shared(5)); EXPECT_TRUE(profiles.hasProfileEntry("ns")); ProfileBase2::ConstPtr profile_check3; - ASSERT_NO_THROW(profile_check3 = profiles.getProfile("ns", "key")); + ASSERT_NO_THROW(profile_check3 = profiles.getProfile("ns", "key")); // NOLINT ASSERT_TRUE(profile_check3 != nullptr); EXPECT_EQ(profile_check3->b, 5); // Check that other profile entry with same key is not affected ProfileBase::ConstPtr profile_check4; - ASSERT_NO_THROW(profile_check4 = profiles.getProfile("ns", "key")); + ASSERT_NO_THROW(profile_check4 = profiles.getProfile("ns", "key")); // NOLINT ASSERT_TRUE(profile_check4 != nullptr); EXPECT_EQ(profile_check4->a, 20); }