mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-01 02:41:48 +00:00
Clean up include guards and EOF newlines (#65)
* Replaced include guards with #pragma once * All source files now have exactly one newline appended Some files had either two newlines at the end or none (which isn't POSIX compliant). This patch fixes that.
This commit is contained in:
committed by
Peter Johnson
parent
d82635bbe1
commit
62812faf62
@@ -5,8 +5,7 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef __BUTTON_H__
|
||||
#define __BUTTON_H__
|
||||
#pragma once
|
||||
|
||||
#include "Buttons/Trigger.h"
|
||||
#include "Commands/Command.h"
|
||||
@@ -33,5 +32,3 @@ class Button : public Trigger {
|
||||
virtual void CancelWhenPressed(Command* command);
|
||||
virtual void ToggleWhenPressed(Command* command);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef __BUTTON_SCHEDULER_H__
|
||||
#define __BUTTON_SCHEDULER_H__
|
||||
#pragma once
|
||||
|
||||
class Trigger;
|
||||
class Command;
|
||||
@@ -23,5 +22,3 @@ class ButtonScheduler {
|
||||
Trigger* m_button;
|
||||
Command* m_command;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef __CANCEL_BUTTON_SCHEDULER_H__
|
||||
#define __CANCEL_BUTTON_SCHEDULER_H__
|
||||
#pragma once
|
||||
|
||||
#include "Buttons/ButtonScheduler.h"
|
||||
|
||||
@@ -22,5 +21,3 @@ class CancelButtonScheduler : public ButtonScheduler {
|
||||
private:
|
||||
bool pressedLast;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef __HELD_BUTTON_SCHEDULER_H__
|
||||
#define __HELD_BUTTON_SCHEDULER_H__
|
||||
#pragma once
|
||||
|
||||
#include "Buttons/ButtonScheduler.h"
|
||||
|
||||
@@ -19,5 +18,3 @@ class HeldButtonScheduler : public ButtonScheduler {
|
||||
virtual ~HeldButtonScheduler() = default;
|
||||
virtual void Execute();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef __INTERNAL_BUTTON_H__
|
||||
#define __INTERNAL_BUTTON_H__
|
||||
#pragma once
|
||||
|
||||
#include "Buttons/Button.h"
|
||||
|
||||
@@ -25,5 +24,3 @@ class InternalButton : public Button {
|
||||
bool m_pressed = false;
|
||||
bool m_inverted = false;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef __JOYSTICK_BUTTON_H__
|
||||
#define __JOYSTICK_BUTTON_H__
|
||||
#pragma once
|
||||
|
||||
#include "Buttons/Button.h"
|
||||
#include "GenericHID.h"
|
||||
@@ -22,5 +21,3 @@ class JoystickButton : public Button {
|
||||
GenericHID* m_joystick;
|
||||
int m_buttonNumber;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef __NETWORK_BUTTON_H__
|
||||
#define __NETWORK_BUTTON_H__
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
@@ -24,5 +23,3 @@ class NetworkButton : public Button {
|
||||
std::shared_ptr<ITable> m_netTable;
|
||||
std::string m_field;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef __PRESSED_BUTTON_SCHEDULER_H__
|
||||
#define __PRESSED_BUTTON_SCHEDULER_H__
|
||||
#pragma once
|
||||
|
||||
#include "Buttons/ButtonScheduler.h"
|
||||
|
||||
@@ -19,5 +18,3 @@ class PressedButtonScheduler : public ButtonScheduler {
|
||||
virtual ~PressedButtonScheduler() = default;
|
||||
virtual void Execute();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef __RELEASED_BUTTON_SCHEDULER_H__
|
||||
#define __RELEASED_BUTTON_SCHEDULER_H__
|
||||
#pragma once
|
||||
|
||||
#include "Buttons/ButtonScheduler.h"
|
||||
|
||||
@@ -19,5 +18,3 @@ class ReleasedButtonScheduler : public ButtonScheduler {
|
||||
virtual ~ReleasedButtonScheduler() = default;
|
||||
virtual void Execute();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef __TOGGLE_BUTTON_SCHEDULER_H__
|
||||
#define __TOGGLE_BUTTON_SCHEDULER_H__
|
||||
#pragma once
|
||||
|
||||
#include "Buttons/ButtonScheduler.h"
|
||||
|
||||
@@ -22,5 +21,3 @@ class ToggleButtonScheduler : public ButtonScheduler {
|
||||
private:
|
||||
bool pressedLast;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef __TRIGGER_H__
|
||||
#define __TRIGGER_H__
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include "SmartDashboard/Sendable.h"
|
||||
@@ -49,5 +48,3 @@ class Trigger : public Sendable {
|
||||
protected:
|
||||
std::shared_ptr<ITable> m_table;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef __COMMAND_H__
|
||||
#define __COMMAND_H__
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <set>
|
||||
@@ -178,5 +177,3 @@ class Command : public ErrorBase, public NamedSendable, public ITableListener {
|
||||
protected:
|
||||
std::shared_ptr<ITable> m_table;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef __COMMAND_GROUP_H__
|
||||
#define __COMMAND_GROUP_H__
|
||||
#pragma once
|
||||
|
||||
#include <list>
|
||||
#include <vector>
|
||||
@@ -69,5 +68,3 @@ class CommandGroup : public Command {
|
||||
/** The current command, -1 signifies that none have been run */
|
||||
int m_currentCommandIndex = -1;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef __COMMAND_GROUP_ENTRY_H__
|
||||
#define __COMMAND_GROUP_ENTRY_H__
|
||||
#pragma once
|
||||
|
||||
class Command;
|
||||
|
||||
@@ -26,5 +25,3 @@ class CommandGroupEntry {
|
||||
Command* m_command = nullptr;
|
||||
Sequence m_state = kSequence_InSequence;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef __PID_COMMAND_H__
|
||||
#define __PID_COMMAND_H__
|
||||
#pragma once
|
||||
|
||||
#include "Commands/Command.h"
|
||||
#include "PIDController.h"
|
||||
@@ -55,5 +54,3 @@ class PIDCommand : public Command, public PIDOutput, public PIDSource {
|
||||
virtual void InitTable(std::shared_ptr<ITable> table);
|
||||
virtual std::string GetSmartDashboardType() const;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef __PID_SUBSYSTEM_H__
|
||||
#define __PID_SUBSYSTEM_H__
|
||||
#pragma once
|
||||
|
||||
#include "Commands/Subsystem.h"
|
||||
#include "PIDController.h"
|
||||
@@ -70,5 +69,3 @@ class PIDSubsystem : public Subsystem, public PIDOutput, public PIDSource {
|
||||
virtual void InitTable(std::shared_ptr<ITable> table);
|
||||
virtual std::string GetSmartDashboardType() const;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef __PRINT_COMMAND_H__
|
||||
#define __PRINT_COMMAND_H__
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include "Commands/Command.h"
|
||||
@@ -26,5 +25,3 @@ class PrintCommand : public Command {
|
||||
private:
|
||||
std::string m_message;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef __SCHEDULER_H__
|
||||
#define __SCHEDULER_H__
|
||||
#pragma once
|
||||
|
||||
#include <list>
|
||||
#include <map>
|
||||
@@ -67,4 +66,3 @@ class Scheduler : public ErrorBase, public NamedSendable {
|
||||
std::shared_ptr<ITable> m_table;
|
||||
bool m_runningCommandsChanged = false;
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef __START_COMMAND_H__
|
||||
#define __START_COMMAND_H__
|
||||
#pragma once
|
||||
|
||||
#include "Commands/Command.h"
|
||||
|
||||
@@ -25,5 +24,3 @@ class StartCommand : public Command {
|
||||
private:
|
||||
Command* m_commandToFork;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef __SUBSYSTEM_H__
|
||||
#define __SUBSYSTEM_H__
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
@@ -46,5 +45,3 @@ class Subsystem : public ErrorBase, public NamedSendable {
|
||||
protected:
|
||||
std::shared_ptr<ITable> m_table;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef __WAIT_COMMAND_H__
|
||||
#define __WAIT_COMMAND_H__
|
||||
#pragma once
|
||||
|
||||
#include "Commands/Command.h"
|
||||
|
||||
@@ -23,5 +22,3 @@ class WaitCommand : public Command {
|
||||
virtual void End();
|
||||
virtual void Interrupted();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef __WAIT_FOR_CHILDREN_H__
|
||||
#define __WAIT_FOR_CHILDREN_H__
|
||||
#pragma once
|
||||
|
||||
#include "Commands/Command.h"
|
||||
|
||||
@@ -23,5 +22,3 @@ class WaitForChildren : public Command {
|
||||
virtual void End();
|
||||
virtual void Interrupted();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef __WAIT_UNTIL_COMMAND_H__
|
||||
#define __WAIT_UNTIL_COMMAND_H__
|
||||
#pragma once
|
||||
|
||||
#include "Commands/Command.h"
|
||||
|
||||
@@ -26,5 +25,3 @@ class WaitUntilCommand : public Command {
|
||||
private:
|
||||
double m_time;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef _LIVE_WINDOW_H
|
||||
#define _LIVE_WINDOW_H
|
||||
#pragma once
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
@@ -82,5 +81,3 @@ class LiveWindow {
|
||||
bool m_enabled = false;
|
||||
bool m_firstTime = true;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef LIVEWINDOWSENDABLE_H_
|
||||
#define LIVEWINDOWSENDABLE_H_
|
||||
#pragma once
|
||||
|
||||
#include "SmartDashboard/Sendable.h"
|
||||
|
||||
@@ -35,5 +34,3 @@ class LiveWindowSendable : public Sendable {
|
||||
*/
|
||||
virtual void StopLiveWindowMode() = 0;
|
||||
};
|
||||
|
||||
#endif /* LIVEWINDOWSENDABLE_H_ */
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef _LIVE_WINDOW_STATUS_LISTENER_H
|
||||
#define _LIVE_WINDOW_STATUS_LISTENER_H
|
||||
#pragma once
|
||||
|
||||
#include "tables/ITable.h"
|
||||
#include "tables/ITableListener.h"
|
||||
@@ -16,5 +15,3 @@ class LiveWindowStatusListener : public ITableListener {
|
||||
virtual void ValueChanged(ITable* source, llvm::StringRef key,
|
||||
std::shared_ptr<nt::Value> value, bool isNew);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
/*
|
||||
* NamedSendable.h
|
||||
*
|
||||
* Created on: Oct 19, 2012
|
||||
* Author: Mitchell Wills
|
||||
*/
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) FIRST 2012-2016. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef NAMEDSENDABLE_H_
|
||||
#define NAMEDSENDABLE_H_
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include "SmartDashboard/Sendable.h"
|
||||
@@ -24,5 +23,3 @@ class NamedSendable : public Sendable {
|
||||
*/
|
||||
virtual std::string GetName() const = 0;
|
||||
};
|
||||
|
||||
#endif /* NAMEDSENDABLE_H_ */
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef __SMART_DASHBOARD_DATA__
|
||||
#define __SMART_DASHBOARD_DATA__
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
@@ -31,5 +30,3 @@ class Sendable {
|
||||
*/
|
||||
virtual std::string GetSmartDashboardType() const = 0;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef __SENDABLE_CHOOSER_H__
|
||||
#define __SENDABLE_CHOOSER_H__
|
||||
#pragma once
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
@@ -44,5 +43,3 @@ class SendableChooser : public Sendable {
|
||||
std::map<std::string, void*> m_choices;
|
||||
std::shared_ptr<ITable> m_table;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef __SMART_DASHBOARD_H__
|
||||
#define __SMART_DASHBOARD_H__
|
||||
#pragma once
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
@@ -49,5 +48,3 @@ class SmartDashboard : public SensorBase {
|
||||
*/
|
||||
static std::map<std::shared_ptr<ITable>, Sendable*> m_tablesToData;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef INTERFACES_POTENTIOMETER_H
|
||||
#define INTERFACES_POTENTIOMETER_H
|
||||
#pragma once
|
||||
|
||||
#include "PIDSource.h"
|
||||
|
||||
@@ -26,5 +25,3 @@ class Potentiometer : public PIDSource {
|
||||
|
||||
virtual void SetPIDSourceType(PIDSourceType pidSource) override;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user