From 8f794ecca7d0f741538cb616dfe71bb9a1d62ccc Mon Sep 17 00:00:00 2001 From: Shahzad Malik Muzaffar Date: Wed, 18 Dec 2024 08:30:49 +0100 Subject: [PATCH] [ML] Apply code checks/format --- PhysicsTools/TensorFlowAOT/src/Batching.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PhysicsTools/TensorFlowAOT/src/Batching.cc b/PhysicsTools/TensorFlowAOT/src/Batching.cc index f7f00c58c8e51..3bfa06e5110b9 100644 --- a/PhysicsTools/TensorFlowAOT/src/Batching.cc +++ b/PhysicsTools/TensorFlowAOT/src/Batching.cc @@ -21,7 +21,7 @@ namespace tfaot { BatchRule::BatchRule(const std::string& ruleString) { // extract the target batch size from the front std::string rule = ruleString; - auto pos = rule.find(":"); + auto pos = rule.find(':'); if (pos == std::string::npos) { throw cms::Exception("InvalidBatchRule") << "invalid batch rule format: " << ruleString; } @@ -32,7 +32,7 @@ namespace tfaot { std::vector sizes; size_t sumSizes = 0; while (!rule.empty()) { - pos = rule.find(","); + pos = rule.find(','); sizes.push_back(std::stoi(rule.substr(0, pos))); sumSizes += sizes.back(); rule = pos == std::string::npos ? "" : rule.substr(pos + 1); @@ -53,7 +53,7 @@ namespace tfaot { void BatchRule::validate() const { // sizes must not be empty - if (sizes_.size() == 0) { + if (sizes_.empty()) { throw cms::Exception("EmptySizes") << "no batch sizes provided for stitching"; }