Fix style issues reported by clang-tidy (#1167)
This commit is contained in:
@@ -136,7 +136,7 @@ std::vector<TokenIDs> OfflineTtsCharacterFrontend::ConvertTextToTokenIds(
|
||||
this_sentence.push_back(eos_id);
|
||||
}
|
||||
|
||||
ans.push_back(std::move(this_sentence));
|
||||
ans.emplace_back(std::move(this_sentence));
|
||||
this_sentence = {};
|
||||
|
||||
// re-initialize this_sentence
|
||||
@@ -152,7 +152,7 @@ std::vector<TokenIDs> OfflineTtsCharacterFrontend::ConvertTextToTokenIds(
|
||||
}
|
||||
|
||||
if (static_cast<int32_t>(this_sentence.size()) > 1 + use_eos_bos) {
|
||||
ans.push_back(std::move(this_sentence));
|
||||
ans.emplace_back(std::move(this_sentence));
|
||||
}
|
||||
} else {
|
||||
// not adding blank
|
||||
@@ -171,7 +171,7 @@ std::vector<TokenIDs> OfflineTtsCharacterFrontend::ConvertTextToTokenIds(
|
||||
this_sentence.push_back(eos_id);
|
||||
}
|
||||
|
||||
ans.push_back(std::move(this_sentence));
|
||||
ans.emplace_back(std::move(this_sentence));
|
||||
this_sentence = {};
|
||||
|
||||
// re-initialize this_sentence
|
||||
@@ -182,7 +182,7 @@ std::vector<TokenIDs> OfflineTtsCharacterFrontend::ConvertTextToTokenIds(
|
||||
}
|
||||
|
||||
if (this_sentence.size() > 1) {
|
||||
ans.push_back(std::move(this_sentence));
|
||||
ans.emplace_back(std::move(this_sentence));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user