Skip to content

Commit

Permalink
Remove unused exception parameter from files inc facer/engine/utils/S…
Browse files Browse the repository at this point in the history
…tatsD.cpp

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: dmm-fb

Differential Revision: D51977749

fbshipit-source-id: aab6f8bcb8a0d9273b7894b8e85615d4a31cac86
  • Loading branch information
r-barnes authored and facebook-github-bot committed Jan 3, 2024
1 parent 449f02c commit b7681be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion faiss/IndexIDMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ void IndexIDMap2Template<IndexT>::reconstruct(
typename IndexT::component_t* recons) const {
try {
this->index->reconstruct(rev_map.at(key), recons);
} catch (const std::out_of_range& e) {
} catch (const std::out_of_range&) {
FAISS_THROW_FMT("key %" PRId64 " not found", key);
}
}
Expand Down

0 comments on commit b7681be

Please sign in to comment.