Skip to content

Commit

Permalink
Fix suggestions about size_t from key4hep#222
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell committed Aug 26, 2024
1 parent 42f3fae commit edb8535
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion k4FWCore/include/k4FWCore/Consumer.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ namespace k4FWCore {
* @param i The index of the input
* @return A range of the input locations
*/
auto inputLocations(unsigned i) const {
auto inputLocations(size_t i) const {
if (i >= sizeof...(In)) {
throw std::out_of_range("Called inputLocations with an index out of range, index: " + std::to_string(i) +
", number of inputs: " + std::to_string(sizeof...(In)));
Expand Down
2 changes: 1 addition & 1 deletion k4FWCore/include/k4FWCore/Transformer.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ namespace k4FWCore {
* @param i The index of the input
* @return A range of the input locations
*/
auto inputLocations(unsigned i) const {
auto inputLocations(size_t i) const {
if (i >= sizeof...(In)) {
throw std::out_of_range("Called inputLocations with an index out of range, index: " + std::to_string(i) +
", number of inputs: " + std::to_string(sizeof...(In)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ struct ExampleFunctionalMetadataConsumer final : k4FWCore::Consumer<void(const e
void operator()(const edm4hep::MCParticleCollection& input) const override {
// Check that it's possible to get metadata parameters from the main loop
auto particleNum = k4FWCore::getParameter<int>("NumberOfParticles", this).value_or(-1);
if (input.size() != (size_t)particleNum) {
if (input.size() != static_cast<size_t>(particleNum)) {
error() << "Input MCParticleCollection size is not " << particleNum << endmsg;
return;
}
Expand Down

0 comments on commit edb8535

Please sign in to comment.