From: Christopher Dykes Date: Fri, 22 Jul 2016 17:13:30 +0000 (-0700) Subject: Don't typedef types to the same name in different namespaces X-Git-Tag: 2016.07.26~16 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9b2bbca75345932f76311d8d848487ad48f1705d;p=folly.git Don't typedef types to the same name in different namespaces Summary: This was causing MSVC to complain due to `DSched` already being declared in `BatonTestHelpers.h` as `::folly::DSched`, but it's then typedef'd again in `BatonTest.cpp`, this time as `::DSched`. MSVC complains about the duplicate definitions even though they resolve to the same type, so kill the one in the source file and keep the one in the header. The same is the case with `GroupVarint32Decoder` and `GroupVarint64Decoder`, which are both declared in `GroupVarint.h` and then again, this time in an anon namespace, in `GroupVarintTest.cpp`. Reviewed By: yfeldblum Differential Revision: D3600948 fbshipit-source-id: 401790aa918289fe4a34dd5af683f8c6ca50d847 --- diff --git a/folly/test/BatonTest.cpp b/folly/test/BatonTest.cpp index dfe604ed..eaeb5ad6 100644 --- a/folly/test/BatonTest.cpp +++ b/folly/test/BatonTest.cpp @@ -25,8 +25,6 @@ using namespace folly; using namespace folly::test; using folly::detail::EmulatedFutexAtomic; -typedef DeterministicSchedule DSched; - TEST(Baton, basic) { Baton<> b; b.post(); diff --git a/folly/test/GroupVarintTest.cpp b/folly/test/GroupVarintTest.cpp index fa3bc117..8b05713c 100644 --- a/folly/test/GroupVarintTest.cpp +++ b/folly/test/GroupVarintTest.cpp @@ -39,8 +39,6 @@ class StringAppender { typedef GroupVarintEncoder GroupVarint32Encoder; typedef GroupVarintEncoder GroupVarint64Encoder; -typedef GroupVarintDecoder GroupVarint32Decoder; -typedef GroupVarintDecoder GroupVarint64Decoder; // Expected bytes follow, terminate with -1 void testGroupVarint32(uint32_t a, uint32_t b, uint32_t c, uint32_t d, ...) {