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/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)