X-Git-Url: http://plrg.eecs.uci.edu/git/?p=folly.git;a=blobdiff_plain;f=folly%2FMPMCPipeline.h;h=eca0b29b7fda3bc27b0ef97dab48e00e9345962d;hp=4eae16439906f4fd859be9966cf33adb283a6c58;hb=e70058f47d312aaf194207ff6034089850750c1e;hpb=22afce906d7e98d95f8c45c3301072d9fd891d41 diff --git a/folly/MPMCPipeline.h b/folly/MPMCPipeline.h index 4eae1643..eca0b29b 100644 --- a/folly/MPMCPipeline.h +++ b/folly/MPMCPipeline.h @@ -1,5 +1,5 @@ /* - * Copyright 2014 Facebook, Inc. + * Copyright 2017 Facebook, Inc. * * 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 -#include "folly/detail/MPMCPipelineDetail.h" +#include namespace folly { @@ -161,12 +161,15 @@ template class MPMCPipeline { #endif remainingUses_(amplification), value_(value * amplification) { + (void)owner; // -Wunused-parameter } uint64_t use(MPMCPipeline* owner) { CHECK_GT(remainingUses_--, 0); #ifndef NDEBUG CHECK(owner == owner_); +#else + (void)owner; // -Wunused-parameter #endif return value_++; } @@ -176,7 +179,7 @@ template class MPMCPipeline { * 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. @@ -272,8 +275,9 @@ template class MPMCPipeline { * in any queue) are also counted. */ ssize_t sizeGuess() const noexcept { - return (std::get<0>(stages_).writeCount() * kAmplification - - std::get(stages_).readCount()); + return ssize_t( + std::get<0>(stages_).writeCount() * kAmplification - + std::get(stages_).readCount()); } private: @@ -282,4 +286,3 @@ template class MPMCPipeline { } // namespaces -