migrate from folly::in_place (assorted)

Summary: Under c++17, `folly::in_place` is just an alias for `std::in_place`. Migrate existing uses.

Reviewed By: Gownta

Differential Revision: D55085146

fbshipit-source-id: bf3b08da10de0e4c7f698513d545fb6159cea131
This commit is contained in:
Yedidya Feldblum 2024-03-25 12:17:34 -07:00 committed by Facebook GitHub Bot
parent cfa67e66fe
commit 9cd884d10b
9 changed files with 11 additions and 11 deletions

View File

@ -141,7 +141,7 @@ constexpr PathComponentPiece kNfsdSocketName{"nfsd.socket"_pc};
class EdenMount::JournalDiffCallback : public DiffCallback {
public:
explicit JournalDiffCallback()
: data_{folly::in_place, std::unordered_set<RelativePath>()} {}
: data_{std::in_place, std::unordered_set<RelativePath>()} {}
void ignoredPath(RelativePathPiece, dtype_t) override {}

View File

@ -581,7 +581,7 @@ FileInode::FileInode(
const std::optional<InodeTimestamps>& initialTimestamps,
const ObjectId* hash)
: Base(ino, initialMode, initialTimestamps, std::move(parentInode), name),
state_(folly::in_place, hash) {}
state_(std::in_place, hash) {}
// The FileInode is in MATERIALIZED_IN_OVERLAY state.
FileInode::FileInode(
@ -591,7 +591,7 @@ FileInode::FileInode(
mode_t initialMode,
const InodeTimestamps& initialTimestamps)
: Base(ino, initialMode, initialTimestamps, std::move(parentInode), name),
state_(folly::in_place) {}
state_(std::in_place) {}
ImmediateFuture<struct stat> FileInode::setattr(
const DesiredMetadata& desired,

View File

@ -246,7 +246,7 @@ class InodeTable {
private:
explicit InodeTable(MappedDiskVector<Entry>&& storage, EdenStatsPtr stats)
: state_{folly::in_place, std::move(storage)}, stats_{std::move(stats)} {}
: state_{std::in_place, std::move(storage)}, stats_{std::move(stats)} {}
/**
* Helper function that, in the common case that this inode number

View File

@ -71,7 +71,7 @@ OverlayFileAccess::State::State(size_t cacheSize) : entries{cacheSize} {
}
OverlayFileAccess::OverlayFileAccess(Overlay* overlay, size_t cacheSize)
: overlay_{overlay}, state_{folly::in_place, cacheSize} {}
: overlay_{overlay}, state_{std::in_place, cacheSize} {}
OverlayFileAccess::~OverlayFileAccess() = default;

View File

@ -143,7 +143,7 @@ class OverlayFileAccess {
std::optional<size_t> s,
const std::optional<Hash20>& sha1,
const std::optional<Hash32>& blake3 = std::nullopt)
: file{std::move(f)}, info{folly::in_place, s, sha1, blake3} {}
: file{std::move(f)}, info{std::in_place, s, sha1, blake3} {}
struct Info {
Info(

View File

@ -170,7 +170,7 @@ TreeInode::TreeInode(
DirContents&& dir,
std::optional<ObjectId> treeHash)
: Base(ino, initialMode, initialTimestamps, parent, name),
contents_(folly::in_place, std::move(dir), std::move(treeHash)) {
contents_(std::in_place, std::move(dir), std::move(treeHash)) {
XDCHECK_NE(ino, kRootNodeId);
}
@ -184,7 +184,7 @@ TreeInode::TreeInode(
EdenMount* mount,
DirContents&& dir,
std::optional<ObjectId> treeHash)
: Base(mount), contents_(folly::in_place, std::move(dir), treeHash) {}
: Base(mount), contents_(std::in_place, std::move(dir), treeHash) {}
TreeInode::~TreeInode() = default;

View File

@ -69,7 +69,7 @@ ObjectStore::ObjectStore(
std::shared_ptr<const EdenConfig> edenConfig,
bool windowsSymlinksEnabled,
CaseSensitivity caseSensitive)
: metadataCache_{folly::in_place, edenConfig->metadataCacheSize.getValue()},
: metadataCache_{std::in_place, edenConfig->metadataCacheSize.getValue()},
treeCache_{std::move(treeCache)},
backingStore_{std::move(backingStore)},
stats_{std::move(stats)},

View File

@ -55,7 +55,7 @@ class ActivityBuffer {
template <typename TraceEvent>
ActivityBuffer<TraceEvent>::ActivityBuffer(size_t maxEvents)
: events_{folly::in_place, maxEvents} {}
: events_{std::in_place, maxEvents} {}
template <typename TraceEvent>
template <typename T>

View File

@ -18,7 +18,7 @@ namespace facebook::eden {
struct ThreadLocalBucket {
explicit ThreadLocalBucket(ProcessAccessLog* processAccessLog)
: state_{folly::in_place, processAccessLog} {}
: state_{std::in_place, processAccessLog} {}
~ThreadLocalBucket() {
// This thread is going away, so merge our data into the parent.