mirror of
https://github.com/facebook/sapling.git
synced 2024-10-04 22:07:44 +03:00
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:
parent
cfa67e66fe
commit
9cd884d10b
@ -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 {}
|
||||
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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(
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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)},
|
||||
|
@ -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>
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user