Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Joseph Eng <[email protected]>
  • Loading branch information
Gold856 and KangarooKoala authored Jun 22, 2024
1 parent 58b86ec commit 0a1e462
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions wpilibc/src/main/native/cpp/simulation/SendableChooserSim.cpp
Original file line number Diff line number Diff line change
@@ -6,13 +6,9 @@

using namespace frc::sim;

SendableChooserSim::SendableChooserSim(std::string_view path) {
if constexpr (RobotBase::IsSimulation()) {
m_publisher = nt::NetworkTableInstance::GetDefault()
.GetStringTopic(fmt::format("{}{}", path, "selected"))
.Publish();
}
}
SendableChooserSim::SendableChooserSim(std::string_view path)
: SendableChooserSim(nt::NetworkTableInstance::GetDefault(), path) {}

SendableChooserSim::SendableChooserSim(nt::NetworkTableInstance inst,
std::string_view path) {
if constexpr (RobotBase::IsSimulation()) {

0 comments on commit 0a1e462

Please sign in to comment.