From 9b2bbca75345932f76311d8d848487ad48f1705d Mon Sep 17 00:00:00 2001 From: Christopher Dykes Date: Fri, 22 Jul 2016 10:13:30 -0700 Subject: [PATCH] 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 --- folly/test/BatonTest.cpp | 2 -- folly/test/GroupVarintTest.cpp | 2 -- 2 files changed, 4 deletions(-) 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, ...) { -- 2.34.1