Skip to content

Commit 31ee7c6

Browse files
generatedunixname2645487282517272meta-codesync[bot]
authored andcommitted
Fix CQS signal modernize-use-using in fbcode/folly/memory
Differential Revision: D109815150 fbshipit-source-id: 6f7f7032a2d0b82f85f0238960ed508d746212ea
1 parent 097fb7a commit 31ee7c6

2 files changed

Lines changed: 7 additions & 15 deletions

File tree

‎folly/memory/Arena.h‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -234,19 +234,17 @@ class Arena {
234234

235235
// cache_last<true> makes the list keep a pointer to the last element, so we
236236
// have push_back() and constant time splice_after()
237-
typedef boost::intrusive::slist<
237+
using BlockList = boost::intrusive::slist<
238238
Block,
239239
boost::intrusive::member_hook<Block, BlockLink, &Block::link>,
240240
boost::intrusive::constant_time_size<false>,
241-
boost::intrusive::cache_last<true>>
242-
BlockList;
241+
boost::intrusive::cache_last<true>>;
243242

244-
typedef boost::intrusive::slist<
243+
using LargeBlockList = boost::intrusive::slist<
245244
LargeBlock,
246245
boost::intrusive::member_hook<LargeBlock, BlockLink, &LargeBlock::link>,
247246
boost::intrusive::constant_time_size<false>,
248-
boost::intrusive::cache_last<true>>
249-
LargeBlockList;
247+
boost::intrusive::cache_last<true>>;
250248

251249
void* allocateSlow(size_t size);
252250

‎folly/memory/JemallocHugePageAllocator.cpp‎

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,9 @@
5353
#define MADV_HUGEPAGE 0
5454

5555
#if !defined(JEMALLOC_VERSION_MAJOR) || (JEMALLOC_VERSION_MAJOR < 5)
56-
typedef struct extent_hooks_s extent_hooks_t;
57-
typedef void*(
58-
extent_alloc_t)(extent_hooks_t*,
59-
void*,
60-
size_t,
61-
size_t,
62-
bool*,
63-
bool*,
64-
unsigned);
56+
using extent_hooks_t = struct extent_hooks_s;
57+
using extent_alloc_t =
58+
void*(extent_hooks_t*, void*, size_t, size_t, bool*, bool*, unsigned);
6559
struct extent_hooks_s {
6660
extent_alloc_t* alloc;
6761
};

0 commit comments

Comments
 (0)