From 77bd5c9c7e3d223593c81446c11e4d4fbf07a9ad Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Thu, 17 Jan 2019 13:14:33 +0100 Subject: [PATCH] remove some c++98 fallback code --- include/libtorrent/entry.hpp | 1 + src/block_cache.cpp | 12 ------------ src/utp_stream.cpp | 9 --------- 3 files changed, 1 insertion(+), 21 deletions(-) diff --git a/include/libtorrent/entry.hpp b/include/libtorrent/entry.hpp index 1a948b392..cc4d1c3da 100644 --- a/include/libtorrent/entry.hpp +++ b/include/libtorrent/entry.hpp @@ -90,6 +90,7 @@ namespace aux { #if (__cplusplus > 201103) || (defined _MSC_VER && _MSC_VER >= 1900) // this enables us to compare a string_view against the std::string that's // held by the std::map + // is_transparent was introduced in C++14 struct strview_less { using is_transparent = std::true_type; diff --git a/src/block_cache.cpp b/src/block_cache.cpp index c3b294db9..28110239f 100644 --- a/src/block_cache.cpp +++ b/src/block_cache.cpp @@ -154,24 +154,12 @@ POSSIBILITY OF SUCH DAMAGE. #define DEBUG_CACHE 0 -#if __cplusplus >= 201103L || defined __clang__ - #if DEBUG_CACHE #define DLOG(...) std::fprintf(__VA_ARGS__) #else #define DLOG(...) do {} while (false) #endif -#else // cplusplus - -#if DEBUG_CACHE -#define DLOG fprintf -#else -#define DLOG TORRENT_WHILE_0 fprintf -#endif - -#endif // cplusplus - namespace libtorrent { #if DEBUG_CACHE diff --git a/src/utp_stream.cpp b/src/utp_stream.cpp index d2b6f0041..160fdd85e 100644 --- a/src/utp_stream.cpp +++ b/src/utp_stream.cpp @@ -119,18 +119,9 @@ void set_utp_stream_logging(bool enable) { #else -#if __cplusplus >= 201103L || defined __clang__ - #define UTP_LOG(...) do {} while(false) #define UTP_LOGV(...) do {} while(false) -#else - -#define UTP_LOG TORRENT_WHILE_0 printf -#define UTP_LOGV TORRENT_WHILE_0 printf - -#endif // cplusplus - #endif enum