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/y2017/actors/autonomous_actor.cc b/y2017/actors/autonomous_actor.cc
index 1124780..b683f51 100644
--- a/y2017/actors/autonomous_actor.cc
+++ b/y2017/actors/autonomous_actor.cc
@@ -1,8 +1,7 @@
 #include "y2017/actors/autonomous_actor.h"
 
-#include <inttypes.h>
-
 #include <chrono>
+#include <cinttypes>
 #include <cmath>
 
 #include "aos/logging/logging.h"
diff --git a/y2017/actors/autonomous_actor_main.cc b/y2017/actors/autonomous_actor_main.cc
index 436902c..ae13d15 100644
--- a/y2017/actors/autonomous_actor_main.cc
+++ b/y2017/actors/autonomous_actor_main.cc
@@ -1,4 +1,4 @@
-#include <stdio.h>
+#include <cstdio>
 
 #include "aos/events/shm_event_loop.h"
 #include "aos/init.h"
diff --git a/y2017/constants.cc b/y2017/constants.cc
index ab062e2..654edf8 100644
--- a/y2017/constants.cc
+++ b/y2017/constants.cc
@@ -1,9 +1,8 @@
 #include "y2017/constants.h"
 
-#include <inttypes.h>
-#include <math.h>
-#include <stdint.h>
-
+#include <cinttypes>
+#include <cmath>
+#include <cstdint>
 #include <map>
 
 #if __has_feature(address_sanitizer)
@@ -14,7 +13,6 @@
 #include "aos/logging/logging.h"
 #include "aos/network/team_number.h"
 #include "aos/stl_mutex/stl_mutex.h"
-
 #include "y2017/control_loops/drivetrain/drivetrain_dog_motor_plant.h"
 #include "y2017/control_loops/drivetrain/polydrivetrain_dog_motor_plant.h"
 
diff --git a/y2017/constants.h b/y2017/constants.h
index b8bf70a..9c0f3c2 100644
--- a/y2017/constants.h
+++ b/y2017/constants.h
@@ -1,12 +1,11 @@
 #ifndef Y2017_CONSTANTS_H_
 #define Y2017_CONSTANTS_H_
 
-#include <stdint.h>
-#include <math.h>
+#include <cmath>
+#include <cstdint>
 
 #include "frc971/constants.h"
 #include "frc971/shooter_interpolation/interpolation.h"
-
 #include "y2017/control_loops/drivetrain/drivetrain_dog_motor_plant.h"
 #include "y2017/control_loops/superstructure/column/column_plant.h"
 #include "y2017/control_loops/superstructure/hood/hood_plant.h"
@@ -90,8 +89,8 @@
       control_loops::superstructure::hood::kOutputRatio /
       constants::Values::kHoodEncoderRatio * kHoodEncoderCountsPerRevolution;
   static constexpr ::frc971::constants::Range kHoodRange{
-      -0.39 * M_PI / 180.0 - 0.01, 37.11 * M_PI / 180.0, (-0.39 + 1.0) * M_PI / 180.0,
-      (37.11 - 1.0) * M_PI / 180.0};
+      -0.39 * M_PI / 180.0 - 0.01, 37.11 * M_PI / 180.0,
+      (-0.39 + 1.0) * M_PI / 180.0, (37.11 - 1.0) * M_PI / 180.0};
 
   static constexpr double kTurretEncoderCountsPerRevolution = 256 * 4;
   static constexpr double kTurretEncoderRatio = 11.0 / 94.0;
diff --git a/y2017/control_loops/superstructure/vision_distance_average.h b/y2017/control_loops/superstructure/vision_distance_average.h
index 7af2a9b..5f81586 100644
--- a/y2017/control_loops/superstructure/vision_distance_average.h
+++ b/y2017/control_loops/superstructure/vision_distance_average.h
@@ -1,8 +1,8 @@
 #ifndef Y2017_CONTROL_LOOPS_SUPERSTRUCTURE_VISION_DISTANCE_AVERAGE_H_
 #define Y2017_CONTROL_LOOPS_SUPERSTRUCTURE_VISION_DISTANCE_AVERAGE_H_
 
-#include <stdint.h>
 #include <chrono>
+#include <cstdint>
 
 #include "aos/containers/ring_buffer.h"
 #include "aos/time/time.h"
diff --git a/y2017/control_loops/superstructure/vision_time_adjuster.h b/y2017/control_loops/superstructure/vision_time_adjuster.h
index 3c873f7..45dd8bb 100644
--- a/y2017/control_loops/superstructure/vision_time_adjuster.h
+++ b/y2017/control_loops/superstructure/vision_time_adjuster.h
@@ -1,7 +1,7 @@
 #ifndef Y2017_CONTROL_LOOPS_SUPERSTRUCTURE_VISION_TIME_ADJUSTER_H_
 #define Y2017_CONTROL_LOOPS_SUPERSTRUCTURE_VISION_TIME_ADJUSTER_H_
 
-#include <stdint.h>
+#include <cstdint>
 
 #include "aos/containers/ring_buffer.h"
 #include "aos/events/event_loop.h"
diff --git a/y2017/joystick_reader.cc b/y2017/joystick_reader.cc
index 628de2a..13b8720 100644
--- a/y2017/joystick_reader.cc
+++ b/y2017/joystick_reader.cc
@@ -1,8 +1,9 @@
-#include <math.h>
-#include <stdio.h>
-#include <string.h>
 #include <unistd.h>
 
+#include <cmath>
+#include <cstdio>
+#include <cstring>
+
 #include "aos/actions/actions.h"
 #include "aos/init.h"
 #include "aos/logging/logging.h"
diff --git a/y2017/vision/target_finder.cc b/y2017/vision/target_finder.cc
index 91e801e..f7a958c 100644
--- a/y2017/vision/target_finder.cc
+++ b/y2017/vision/target_finder.cc
@@ -1,6 +1,6 @@
 #include "y2017/vision/target_finder.h"
 
-#include <math.h>
+#include <cmath>
 
 namespace y2017 {
 namespace vision {
@@ -248,7 +248,7 @@
   *ry = vec.x() * sin_ang + vec.y() * cos_ang;
 }
 
-void TargetFinder::GetAngleDist(const aos::vision::Vector<2>& target,
+void TargetFinder::GetAngleDist(const aos::vision::Vector<2> &target,
                                 double down_angle, double *dist,
                                 double *angle) {
   // TODO(ben): Will put all these numbers in a config file before
diff --git a/y2017/vision/target_sender.cc b/y2017/vision/target_sender.cc
index 7a24d37..397eb04 100644
--- a/y2017/vision/target_sender.cc
+++ b/y2017/vision/target_sender.cc
@@ -1,8 +1,9 @@
 #include <google/protobuf/io/zero_copy_stream_impl.h>
 #include <google/protobuf/text_format.h>
-#include <stdio.h>
-#include <stdlib.h>
 #include <sys/stat.h>
+
+#include <cstdio>
+#include <cstdlib>
 #include <fstream>
 #include <iostream>
 #include <memory>
@@ -28,15 +29,15 @@
 namespace y2017 {
 namespace vision {
 
-using aos::events::TCPServer;
-using aos::vision::DataRef;
-using aos::vision::Int32Codec;
-using aos::vision::ImageValue;
-using aos::vision::Int64Codec;
-using aos::events::TXUdpSocket;
 using aos::events::DataSocket;
+using aos::events::TCPServer;
+using aos::events::TXUdpSocket;
+using aos::vision::DataRef;
 using aos::vision::ImageFormat;
 using aos::vision::ImageStreamEvent;
+using aos::vision::ImageValue;
+using aos::vision::Int32Codec;
+using aos::vision::Int64Codec;
 
 int64_t Nanos(aos::monotonic_clock::duration time_diff) {
   return std::chrono::duration_cast<std::chrono::nanoseconds>(time_diff)
diff --git a/y2017/wpilib_interface.cc b/y2017/wpilib_interface.cc
index e43bdb1..04e19b6 100644
--- a/y2017/wpilib_interface.cc
+++ b/y2017/wpilib_interface.cc
@@ -1,15 +1,15 @@
-#include <inttypes.h>
-#include <stdio.h>
-#include <string.h>
 #include <unistd.h>
 
 #include <array>
 #include <chrono>
+#include <cinttypes>
 #include <cmath>
+#include <cstdio>
+#include <cstring>
 #include <functional>
+#include <memory>
 #include <mutex>
 #include <thread>
-#include <memory>
 
 #include "frc971/wpilib/ahal/AnalogInput.h"
 #include "frc971/wpilib/ahal/Compressor.h"