Skip to content

Commit ad44667

Browse files
committed
clang-tidy: google-explicit-constructor
1 parent 4082309 commit ad44667

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

include/frc2/command/InstantCommand.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ class InstantCommand : public CommandHelper<CommandBase, InstantCommand> {
3737
* @param toRun the Runnable to run
3838
* @param requirements the subsystems required by this command
3939
*/
40-
InstantCommand(std::function<void()> toRun,
41-
wpi::ArrayRef<Subsystem*> requirements = {});
40+
explicit InstantCommand(std::function<void()> toRun,
41+
wpi::ArrayRef<Subsystem*> requirements = {});
4242

4343
InstantCommand(InstantCommand&& other) = default;
4444

include/frc2/command/RunCommand.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ class RunCommand : public CommandHelper<CommandBase, RunCommand> {
3838
* @param toRun the Runnable to run
3939
* @param requirements the subsystems to require
4040
*/
41-
RunCommand(std::function<void()> toRun,
42-
wpi::ArrayRef<Subsystem*> requirements = {});
41+
explicit RunCommand(std::function<void()> toRun,
42+
wpi::ArrayRef<Subsystem*> requirements = {});
4343

4444
RunCommand(RunCommand&& other) = default;
4545

include/frc2/command/SelectCommand.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ class SelectCommand : public CommandHelper<CommandBase, SelectCommand<Key>> {
4848
template <class... Types,
4949
typename = std::enable_if_t<std::conjunction_v<
5050
std::is_base_of<Command, std::remove_reference_t<Types>>...>>>
51-
SelectCommand(std::function<Key()> selector,
52-
std::pair<Key, Types>... commands)
51+
explicit SelectCommand(std::function<Key()> selector,
52+
std::pair<Key, Types>... commands)
5353
: m_selector{std::move(selector)} {
5454
std::vector<std::pair<Key, std::unique_ptr<Command>>> foo;
5555

0 commit comments

Comments
 (0)