projects
/
folly.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
logging: allow partial updates to log handler settings
[folly.git]
/
folly
/
MPMCPipeline.h
diff --git
a/folly/MPMCPipeline.h
b/folly/MPMCPipeline.h
index dc42244159c0f39c231f5ea8f30069f794eca242..90a4c85aa25e3cd4f69febb5511704f5f7d95423 100644
(file)
--- a/
folly/MPMCPipeline.h
+++ b/
folly/MPMCPipeline.h
@@
-1,5
+1,5
@@
/*
/*
- * Copyright 201
5
Facebook, Inc.
+ * Copyright 201
7
Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-161,12
+161,15
@@
template <class In, class... Stages> class MPMCPipeline {
#endif
remainingUses_(amplification),
value_(value * amplification) {
#endif
remainingUses_(amplification),
value_(value * amplification) {
+ (void)owner; // -Wunused-parameter
}
uint64_t use(MPMCPipeline* owner) {
CHECK_GT(remainingUses_--, 0);
#ifndef NDEBUG
CHECK(owner == owner_);
}
uint64_t use(MPMCPipeline* owner) {
CHECK_GT(remainingUses_--, 0);
#ifndef NDEBUG
CHECK(owner == owner_);
+#else
+ (void)owner; // -Wunused-parameter
#endif
return value_++;
}
#endif
return value_++;
}
@@
-176,7
+179,7
@@
template <class In, class... Stages> class MPMCPipeline {
* Default-construct pipeline. Useful to move-assign later,
* just like MPMCQueue, see MPMCQueue.h for more details.
*/
* Default-construct pipeline. Useful to move-assign later,
* just like MPMCQueue, see MPMCQueue.h for more details.
*/
- MPMCPipeline()
{ }
+ MPMCPipeline()
= default;
/**
* Construct a pipeline with N+1 queue sizes.
/**
* Construct a pipeline with N+1 queue sizes.
@@
-272,13
+275,13
@@
template <class In, class... Stages> class MPMCPipeline {
* in any queue) are also counted.
*/
ssize_t sizeGuess() const noexcept {
* in any queue) are also counted.
*/
ssize_t sizeGuess() const noexcept {
- return (std::get<0>(stages_).writeCount() * kAmplification -
- std::get<sizeof...(Stages)>(stages_).readCount());
+ return ssize_t(
+ std::get<0>(stages_).writeCount() * kAmplification -
+ std::get<sizeof...(Stages)>(stages_).readCount());
}
private:
StageTuple stages_;
};
}
private:
StageTuple stages_;
};
-
-} // namespaces
+} // namespace folly