projects
/
folly.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
apply clang-tidy modernize-use-override
[folly.git]
/
folly
/
MPMCPipeline.h
diff --git
a/folly/MPMCPipeline.h
b/folly/MPMCPipeline.h
index 4eae16439906f4fd859be9966cf33adb283a6c58..eca0b29b7fda3bc27b0ef97dab48e00e9345962d 100644
(file)
--- a/
folly/MPMCPipeline.h
+++ b/
folly/MPMCPipeline.h
@@
-1,5
+1,5
@@
/*
/*
- * Copyright 201
4
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.
@@
-20,7
+20,7
@@
#include <glog/logging.h>
#include <glog/logging.h>
-#include
"folly/detail/MPMCPipelineDetail.h"
+#include
<folly/detail/MPMCPipelineDetail.h>
namespace folly {
namespace folly {
@@
-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,8
+275,9
@@
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:
}
private:
@@
-282,4
+286,3
@@
template <class In, class... Stages> class MPMCPipeline {
} // namespaces
} // namespaces
-