From 895ef696827c79c412ca0ad057d0bdba4be84994 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 25 Nov 2017 11:53:32 -0800 Subject: [PATCH] Remove extraneous type aliases --- src/context.cpp | 3 --- src/main.h | 35 +++++++++++++---------------------- src/source.cpp | 8 -------- 3 files changed, 13 insertions(+), 33 deletions(-) diff --git a/src/context.cpp b/src/context.cpp index 0cfb873..5b1a10c 100644 --- a/src/context.cpp +++ b/src/context.cpp @@ -303,9 +303,6 @@ alure::UniquePtr sFileFactory; namespace alure { -using Vector3Pair = std::pair; - - std::variant parse_timeval(StringView strval, double srate) { size_t cpos = strval.find_first_of(':'); diff --git a/src/main.h b/src/main.h index 4d13e41..1416627 100644 --- a/src/main.h +++ b/src/main.h @@ -29,40 +29,31 @@ using mpark::holds_alternative; #define UNLIKELY(x) static_cast(x) #endif -#define DECL_THUNK0(ret, C, Name, cv) \ +#define DECL_THUNK0(ret, C, Name, cv) \ ret C::Name() cv { return pImpl->Name(); } #define DECL_THUNK1(ret, C, Name, cv, T1) \ -ret C::Name(T1 a) cv \ -{ \ - using _t1 = T1; \ - return pImpl->Name(std::forward<_t1>(a)); \ -} +ret C::Name(T1 a) cv { return pImpl->Name(std::forward(a)); } #define DECL_THUNK2(ret, C, Name, cv, T1, T2) \ ret C::Name(T1 a, T2 b) cv \ -{ \ - using _t1 = T1; using _t2 = T2; \ - return pImpl->Name(std::forward<_t1>(a), std::forward<_t2>(b)); \ -} +{ return pImpl->Name(std::forward(a), std::forward(b)); } #define DECL_THUNK3(ret, C, Name, cv, T1, T2, T3) \ ret C::Name(T1 a, T2 b, T3 c) cv \ { \ - using _t1 = T1; using _t2 = T2; using _t3 = T3; \ - return pImpl->Name(std::forward<_t1>(a), std::forward<_t2>(b), \ - std::forward<_t3>(c)); \ -} -#define DECL_THUNK6(ret, C, Name, cv, T1, T2, T3, T4, T5, T6) \ -ret C::Name(T1 a, T2 b, T3 c, T4 d, T5 e, T6 f) cv \ -{ \ - using _t1 = T1; using _t2 = T2; using _t3 = T3; \ - using _t4 = T4; using _t5 = T5; using _t6 = T6; \ - return pImpl->Name(std::forward<_t1>(a), std::forward<_t2>(b), \ - std::forward<_t3>(c), std::forward<_t4>(d), \ - std::forward<_t5>(e), std::forward<_t6>(f)); \ + return pImpl->Name(std::forward(a), std::forward(b), \ + std::forward(c)); \ } namespace alure { +// Need to use these to avoid extraneous commas in macro parameter lists +using Vector3Pair = std::pair; +using UInt64NSecPair = std::pair; +using SecondsPair = std::pair; +using ALfloatPair = std::pair; +using BoolTriple = std::tuple; + + template inline std::future_status GetFutureState(const SharedFuture &future) { return future.wait_for(std::chrono::seconds::zero()); } diff --git a/src/source.cpp b/src/source.cpp index 17d3ec7..0de35d2 100644 --- a/src/source.cpp +++ b/src/source.cpp @@ -18,14 +18,6 @@ namespace alure { -// Need to use these to avoid extraneous commas in macro parameter lists -using UInt64NSecPair = std::pair; -using SecondsPair = std::pair; -using ALfloatPair = std::pair; -using Vector3Pair = std::pair; -using BoolTriple = std::tuple; - - class ALBufferStream { SharedPtr mDecoder; -- 2.11.4.GIT