Skip to content

Commit 5826a50

Browse files
r-barnesmeta-codesync[bot]
authored andcommitted
Remove unused exception parameters from a few files
Summary: `-Wunused-exception-parameter` has identified an unused exception parameter. This diff removes it. This: ``` try { ... } catch (exception& e) { // no use of e } ``` should instead be written as ``` } catch (exception&) { ``` If the code compiles, this is safe to land. Reviewed By: dtolnay Differential Revision: D89501752 fbshipit-source-id: 4c3ba0151af3f44d0f2fc23f12e3a808a9e1d86c
1 parent 5abc45b commit 5826a50

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

folly/fibers/AtomicBatchDispatcher-inl.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ struct AtomicBatchDispatcher<InputT, ResultT>::DispatchBaton {
3131
}
3232

3333
void setExpectedCount(size_t expectedCount) {
34-
assert(expectedCount_ == 0 || !"expectedCount_ being set more than once");
34+
assert(expectedCount_ == 0 && "expectedCount_ being set more than once");
3535
expectedCount_ = expectedCount;
3636
optEntries_.resize(expectedCount_);
3737
}
@@ -41,7 +41,7 @@ struct AtomicBatchDispatcher<InputT, ResultT>::DispatchBaton {
4141
optEntries_.resize(sequenceNumber + 1);
4242
}
4343
folly::Optional<Entry>& optEntry = optEntries_[sequenceNumber];
44-
assert(!optEntry || !"Multiple inputs have the same token sequence number");
44+
assert(!optEntry && "Multiple inputs have the same token sequence number");
4545
optEntry = Entry(std::move(input));
4646
return optEntry->promise.getFuture();
4747
}
@@ -65,8 +65,8 @@ struct AtomicBatchDispatcher<InputT, ResultT>::DispatchBaton {
6565

6666
// Validate entries count same as expectedCount_
6767
assert(
68-
optEntries_.size() == expectedCount_ ||
69-
!"Entries vector did not have expected size");
68+
optEntries_.size() == expectedCount_ &&
69+
"Entries vector did not have expected size");
7070
std::vector<size_t> vecTokensNotDispatched;
7171
for (size_t i = 0; i < expectedCount_; ++i) {
7272
if (!optEntries_[i]) {

0 commit comments

Comments
 (0)