Skip to content

Commit 720c8a0

Browse files
CodemodService Botfacebook-github-bot
authored andcommitted
Fix CQS signal readability-braces-around-statements in fbcode/pytorch/tokenizers
Reviewed By: dtolnay Differential Revision: D79074284
1 parent 287ef1a commit 720c8a0

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/normalizer.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,9 @@ std::unique_ptr<IRegex> ReplaceNormalizer::create_regex_(
102102
}
103103

104104
std::string ReplaceNormalizer::normalize(const std::string& input) const {
105-
if (!regex_)
105+
if (!regex_) {
106106
return input;
107+
}
107108

108109
std::string result = input;
109110
auto matches = regex_->find_all(result);

src/pre_tokenizer.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,9 @@ std::unique_ptr<IRegex> RegexPreTokenizer::create_regex_(
151151

152152
std::vector<std::string> RegexPreTokenizer::pre_tokenize(
153153
const std::string& input) const {
154-
if (!regex_)
154+
if (!regex_) {
155155
return {};
156+
}
156157

157158
std::vector<std::string> results;
158159
auto matches = regex_->find_all(input);

0 commit comments

Comments
 (0)