mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[wpilib] Remove unhelpful comments from BooleanEvent (#7970)
These were apparently a meme about state being hard to manage rather than a statement about the code itself. I spent a while trying to find some complex logic this comment was alluding to that would indicate why it's "a nightmare to manage".
This commit is contained in:
@@ -129,8 +129,12 @@ class BooleanEvent {
|
||||
frc::Debouncer::DebounceType::kRising);
|
||||
|
||||
private:
|
||||
/// Poller loop.
|
||||
EventLoop* m_loop;
|
||||
|
||||
std::function<bool()> m_signal;
|
||||
std::shared_ptr<bool> m_state; // A programmer's worst nightmare.
|
||||
|
||||
/// The state of the condition in the current loop poll.
|
||||
std::shared_ptr<bool> m_state;
|
||||
};
|
||||
} // namespace frc
|
||||
|
||||
@@ -28,7 +28,7 @@ public class BooleanEvent implements BooleanSupplier {
|
||||
|
||||
private final BooleanSupplier m_signal;
|
||||
|
||||
/** The state of the condition in the current loop poll. Nightmare to manage. */
|
||||
/** The state of the condition in the current loop poll. */
|
||||
private final AtomicBoolean m_state = new AtomicBoolean(false);
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user