Commit 9b2bbca7 authored by Christopher Dykes's avatar Christopher Dykes Committed by Facebook Github Bot 1

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
parent 138f44b3
...@@ -25,8 +25,6 @@ using namespace folly; ...@@ -25,8 +25,6 @@ using namespace folly;
using namespace folly::test; using namespace folly::test;
using folly::detail::EmulatedFutexAtomic; using folly::detail::EmulatedFutexAtomic;
typedef DeterministicSchedule DSched;
TEST(Baton, basic) { TEST(Baton, basic) {
Baton<> b; Baton<> b;
b.post(); b.post();
......
...@@ -39,8 +39,6 @@ class StringAppender { ...@@ -39,8 +39,6 @@ class StringAppender {
typedef GroupVarintEncoder<uint32_t, StringAppender> GroupVarint32Encoder; typedef GroupVarintEncoder<uint32_t, StringAppender> GroupVarint32Encoder;
typedef GroupVarintEncoder<uint64_t, StringAppender> GroupVarint64Encoder; typedef GroupVarintEncoder<uint64_t, StringAppender> GroupVarint64Encoder;
typedef GroupVarintDecoder<uint32_t> GroupVarint32Decoder;
typedef GroupVarintDecoder<uint32_t> GroupVarint64Decoder;
// Expected bytes follow, terminate with -1 // Expected bytes follow, terminate with -1
void testGroupVarint32(uint32_t a, uint32_t b, uint32_t c, uint32_t d, ...) { void testGroupVarint32(uint32_t a, uint32_t b, uint32_t c, uint32_t d, ...) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment