Replace use of deprecated C Standard library headers in C++ code.

Change-Id: I9fa6630c7e4bdb2897df34d417635d8c7d8253bc
Signed-off-by: Tyler Chatow <tchatow@gmail.com>
diff --git a/frc971/control_loops/control_loop-tmpl.h b/frc971/control_loops/control_loop-tmpl.h
index f6fd0af..0db1786 100644
--- a/frc971/control_loops/control_loop-tmpl.h
+++ b/frc971/control_loops/control_loop-tmpl.h
@@ -1,5 +1,5 @@
-#include <stddef.h>
-#include <inttypes.h>
+#include <cinttypes>
+#include <cstddef>
 
 #include "aos/logging/logging.h"
 
@@ -19,7 +19,8 @@
 
 template <class GoalType, class PositionType, class StatusType,
           class OutputType>
-void ControlLoop<GoalType, PositionType, StatusType, OutputType>::ZeroOutputs() {
+void ControlLoop<GoalType, PositionType, StatusType,
+                 OutputType>::ZeroOutputs() {
   typename ::aos::Sender<OutputType>::Builder builder =
       output_sender_.MakeBuilder();
   builder.Send(Zero(&builder));
diff --git a/frc971/control_loops/control_loop.h b/frc971/control_loops/control_loop.h
index 741b32f..80b0bca 100644
--- a/frc971/control_loops/control_loop.h
+++ b/frc971/control_loops/control_loop.h
@@ -1,9 +1,8 @@
 #ifndef AOS_CONTROL_LOOP_CONTROL_LOOP_H_
 #define AOS_CONTROL_LOOP_CONTROL_LOOP_H_
 
-#include <string.h>
-
 #include <atomic>
+#include <cstring>
 
 #include "aos/events/event_loop.h"
 #include "aos/time/time.h"
diff --git a/frc971/control_loops/drivetrain/drivetrain.cc b/frc971/control_loops/drivetrain/drivetrain.cc
index 5242550..2cc9f35 100644
--- a/frc971/control_loops/drivetrain/drivetrain.cc
+++ b/frc971/control_loops/drivetrain/drivetrain.cc
@@ -1,9 +1,9 @@
 #include "frc971/control_loops/drivetrain/drivetrain.h"
 
 #include <sched.h>
-#include <stdio.h>
 
 #include <cmath>
+#include <cstdio>
 #include <memory>
 
 #include "Eigen/Dense"
diff --git a/frc971/control_loops/drivetrain/drivetrain_uc.q.cc b/frc971/control_loops/drivetrain/drivetrain_uc.q.cc
index 5f8bce4..2a2870c 100644
--- a/frc971/control_loops/drivetrain/drivetrain_uc.q.cc
+++ b/frc971/control_loops/drivetrain/drivetrain_uc.q.cc
@@ -1,5 +1,6 @@
 #include "frc971/control_loops/drivetrain/drivetrain_uc.q.h"
-#include <inttypes.h>
+
+#include <cinttypes>
 
 namespace frc971 {
 namespace control_loops {
diff --git a/frc971/control_loops/hall_effect_tracker.h b/frc971/control_loops/hall_effect_tracker.h
index 084c9a7..c18d2af 100644
--- a/frc971/control_loops/hall_effect_tracker.h
+++ b/frc971/control_loops/hall_effect_tracker.h
@@ -1,7 +1,7 @@
 #ifndef FRC971_CONTROL_LOOPS_HALL_EFFECT_H_
 #define FRC971_CONTROL_LOOPS_HALL_EFFECT_H_
 
-#include <stdint.h>
+#include <cstdint>
 
 #include "frc971/control_loops/control_loops_generated.h"
 
diff --git a/frc971/control_loops/hybrid_state_feedback_loop.h b/frc971/control_loops/hybrid_state_feedback_loop.h
index 4dab950..6285024 100644
--- a/frc971/control_loops/hybrid_state_feedback_loop.h
+++ b/frc971/control_loops/hybrid_state_feedback_loop.h
@@ -1,21 +1,19 @@
 #ifndef FRC971_CONTROL_LOOPS_HYBRID_STATE_FEEDBACK_LOOP_H_
 #define FRC971_CONTROL_LOOPS_HYBRID_STATE_FEEDBACK_LOOP_H_
 
-#include <assert.h>
-
+#include <cassert>
 #include <chrono>
 #include <memory>
 #include <utility>
 #include <vector>
 
 #include "Eigen/Dense"
-#include "unsupported/Eigen/MatrixFunctions"
-
-#include "frc971/control_loops/control_loop.h"
 #include "aos/logging/logging.h"
 #include "aos/macros.h"
 #include "frc971/control_loops/c2d.h"
+#include "frc971/control_loops/control_loop.h"
 #include "frc971/control_loops/state_feedback_loop.h"
+#include "unsupported/Eigen/MatrixFunctions"
 
 template <int number_of_states, int number_of_inputs, int number_of_outputs,
           typename Scalar = double>
diff --git a/frc971/control_loops/state_feedback_loop.h b/frc971/control_loops/state_feedback_loop.h
index 50edf0d..4250df2 100644
--- a/frc971/control_loops/state_feedback_loop.h
+++ b/frc971/control_loops/state_feedback_loop.h
@@ -1,8 +1,7 @@
 #ifndef FRC971_CONTROL_LOOPS_STATE_FEEDBACK_LOOP_H_
 #define FRC971_CONTROL_LOOPS_STATE_FEEDBACK_LOOP_H_
 
-#include <assert.h>
-
+#include <cassert>
 #include <chrono>
 #include <memory>
 #include <utility>
diff --git a/frc971/control_loops/voltage_cap/voltage_cap.h b/frc971/control_loops/voltage_cap/voltage_cap.h
index 49aa9e8..ad4e4c6c 100644
--- a/frc971/control_loops/voltage_cap/voltage_cap.h
+++ b/frc971/control_loops/voltage_cap/voltage_cap.h
@@ -1,29 +1,29 @@
 #ifndef FRC971_CONTROL_LOOPS_VOLTAGE_CAP_VOLTAGE_CAP_H_
 #define FRC971_CONTROL_LOOPS_VOLTAGE_CAP_VOLTAGE_CAP_H_
 
-#include <stdio.h>
+#include <cstdio>
 
 namespace frc971 {
 namespace control_loops {
 
-// This function maintains the difference of power between two voltages passed in
-//   that are outside of our range of possible voltage output.
-// This is because we figured that maintaining the difference rather than the ratio
-//   between the voltages would get us to our goal as fast as possible.
+// This function maintains the difference of power between two voltages passed
+// in that are outside of our range of possible voltage output.
+// This is because we figured that maintaining the difference rather than the
+// ratio between the voltages would get us to our goal as fast as possible.
 //
 //
 // The 'box' is a box formed on a graph by the maximum and minimun voltages of
-//   voltage_one and voltage_two with
-//   voltage_one on the y-axis and voltage_two on the x-axis.
+//   voltage_one and voltage_two with voltage_one on the y-axis and voltage_two
+//   on the x-axis.
 // If a line with a slope of one(45degrees) is plotted from the point formed
-//   by graphing voltage_one(y) and voltage_two(x), the first intersecting point of
-//   the box is the maximum voltage that we can output to get to the goal as
+//   by graphing voltage_one(y) and voltage_two(x), the first intersecting point
+//   of the box is the maximum voltage that we can output to get to the goal as
 //   fast as possible.
 // If the line does not intersect the box, then we use the closest corner of
 //   the box to the line in either quadrant two or quadrant four of the graph.
 void VoltageCap(double max_voltage, double voltage_one, double voltage_two,
                 double *out_voltage_one, double *out_voltage_two);
-  // Defaults to 12v if no voltage is specified.
+// Defaults to 12v if no voltage is specified.
 void VoltageCap(double voltage_one, double voltage_two, double *out_voltage_one,
                 double *out_voltage_two);