THRIFT-3415 - C++: THeader*.h/cpp includes cleanup
Client: C++
Patch: Konrad Grochowski
Used iwyu (Include-What-You-Use) to cleanup list of includes used by
THeader* files
unistd.h is not used at all - removed completely
diff --git a/lib/cpp/src/thrift/protocol/THeaderProtocol.cpp b/lib/cpp/src/thrift/protocol/THeaderProtocol.cpp
index 76732b0..02dc736 100644
--- a/lib/cpp/src/thrift/protocol/THeaderProtocol.cpp
+++ b/lib/cpp/src/thrift/protocol/THeaderProtocol.cpp
@@ -21,10 +21,13 @@
#include <thrift/protocol/THeaderProtocol.h>
#include <thrift/protocol/TCompactProtocol.h>
+#include <thrift/protocol/TBinaryProtocol.h>
#include <thrift/TApplicationException.h>
#include <limits>
+
#include <boost/static_assert.hpp>
+#include <boost/make_shared.hpp>
namespace apache {
namespace thrift {
diff --git a/lib/cpp/src/thrift/protocol/THeaderProtocol.h b/lib/cpp/src/thrift/protocol/THeaderProtocol.h
index 3998f48..e7d4bd6 100644
--- a/lib/cpp/src/thrift/protocol/THeaderProtocol.h
+++ b/lib/cpp/src/thrift/protocol/THeaderProtocol.h
@@ -25,10 +25,8 @@
#include <thrift/protocol/TVirtualProtocol.h>
#include <thrift/transport/THeaderTransport.h>
-#include <bitset>
-
#include <boost/shared_ptr.hpp>
-#include <boost/make_shared.hpp>
+
using apache::thrift::transport::THeaderTransport;
namespace apache {
diff --git a/lib/cpp/src/thrift/transport/THeaderTransport.cpp b/lib/cpp/src/thrift/transport/THeaderTransport.cpp
index 26841b9..79bc5ea 100644
--- a/lib/cpp/src/thrift/transport/THeaderTransport.cpp
+++ b/lib/cpp/src/thrift/transport/THeaderTransport.cpp
@@ -20,12 +20,13 @@
#include <thrift/transport/THeaderTransport.h>
#include <thrift/TApplicationException.h>
#include <thrift/protocol/TProtocolTypes.h>
+#include <thrift/protocol/TBinaryProtocol.h>
-#include <algorithm>
-#include <bitset>
+#include <utility>
#include <cassert>
#include <string>
#include <zlib.h>
+#include <string.h>
using std::map;
using boost::shared_ptr;
diff --git a/lib/cpp/src/thrift/transport/THeaderTransport.h b/lib/cpp/src/thrift/transport/THeaderTransport.h
index 55291ad..94135ea 100644
--- a/lib/cpp/src/thrift/transport/THeaderTransport.h
+++ b/lib/cpp/src/thrift/transport/THeaderTransport.h
@@ -20,16 +20,19 @@
#ifndef THRIFT_TRANSPORT_THEADERTRANSPORT_H_
#define THRIFT_TRANSPORT_THEADERTRANSPORT_H_ 1
-#include <thrift/protocol/TBinaryProtocol.h>
+#include <bitset>
+#include <vector>
+#include <string>
+#include <map>
+
+#include <boost/scoped_array.hpp>
+#include <boost/shared_ptr.hpp>
+
#include <thrift/protocol/TProtocolTypes.h>
#include <thrift/transport/TBufferTransports.h>
#include <thrift/transport/TTransport.h>
#include <thrift/transport/TVirtualTransport.h>
-#include <bitset>
-#include <boost/scoped_array.hpp>
-#include <unistd.h>
-
// Don't include the unknown client.
#define CLIENT_TYPES_LEN 3