From d55636d813761b8d3b218e7be65cf0b396744633 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 8 Jun 2015 10:12:46 -0700 Subject: Revert "Open loop sync/async multithreaded testing" --- include/grpc++/config.h | 24 ++++++++++-------------- include/grpc++/time.h | 16 ++++++---------- 2 files changed, 16 insertions(+), 24 deletions(-) (limited to 'include') diff --git a/include/grpc++/config.h b/include/grpc++/config.h index ca74064be2..55b2a64482 100644 --- a/include/grpc++/config.h +++ b/include/grpc++/config.h @@ -46,7 +46,7 @@ #define GRPC_CXX0X_NO_OVERRIDE 1 #define GRPC_CXX0X_NO_CHRONO 1 #define GRPC_CXX0X_NO_THREAD 1 -#endif +#endif #endif // Visual Studio #ifndef __clang__ @@ -99,28 +99,24 @@ ::google::protobuf::io::ZeroCopyOutputStream #define GRPC_CUSTOM_ZEROCOPYINPUTSTREAM \ ::google::protobuf::io::ZeroCopyInputStream -#define GRPC_CUSTOM_CODEDINPUTSTREAM ::google::protobuf::io::CodedInputStream +#define GRPC_CUSTOM_CODEDINPUTSTREAM \ + ::google::protobuf::io::CodedInputStream #endif + #ifdef GRPC_CXX0X_NO_NULLPTR #include const class { - public: - template - operator T *() const { - return static_cast(0); - } - template - operator std::unique_ptr() const { +public: + template operator T*() const {return static_cast(0);} + template operator std::unique_ptr() const { return std::unique_ptr(static_cast(0)); } - template - operator std::shared_ptr() const { + template operator std::shared_ptr() const { return std::shared_ptr(static_cast(0)); } - operator bool() const { return false; } - - private: + operator bool() const {return false;} +private: void operator&() const = delete; } nullptr = {}; #endif diff --git a/include/grpc++/time.h b/include/grpc++/time.h index 8fb2f8505c..f9b2ce5cab 100644 --- a/include/grpc++/time.h +++ b/include/grpc++/time.h @@ -52,22 +52,22 @@ namespace grpc { template class TimePoint { public: - TimePoint(const T& time) { you_need_a_specialization_of_TimePoint(); } + TimePoint(const T& time) { + you_need_a_specialization_of_TimePoint(); + } gpr_timespec raw_time() { gpr_timespec t; return t; } - private: void you_need_a_specialization_of_TimePoint(); }; -template <> +template<> class TimePoint { public: - TimePoint(const gpr_timespec& time) : time_(time) {} + TimePoint(const gpr_timespec& time) : time_(time) { } gpr_timespec raw_time() { return time_; } - private: gpr_timespec time_; }; @@ -85,9 +85,6 @@ namespace grpc { // from and to should be absolute time. void Timepoint2Timespec(const std::chrono::system_clock::time_point& from, gpr_timespec* to); -void TimepointHR2Timespec( - const std::chrono::high_resolution_clock::time_point& from, - gpr_timespec* to); std::chrono::system_clock::time_point Timespec2Timepoint(gpr_timespec t); @@ -95,10 +92,9 @@ template <> class TimePoint { public: TimePoint(const std::chrono::system_clock::time_point& time) { - Timepoint2Timespec(time, &time_); + Timepoint2Timespec(time, &time_); } gpr_timespec raw_time() const { return time_; } - private: gpr_timespec time_; }; -- cgit v1.2.3