Fix style issues (#1458)

This commit is contained in:
Fangjun Kuang
2024-10-24 11:15:08 +08:00
committed by GitHub
parent ceb69ebd94
commit b3e05f6dc4
55 changed files with 155 additions and 117 deletions

View File

@@ -19,6 +19,8 @@
namespace sherpa_onnx {
namespace {
/// Helper for `OnlineRecognizerResult::AsJsonString()`
template <typename T>
std::string VecToString(const std::vector<T> &vec, int32_t precision = 6) {
@@ -51,6 +53,8 @@ std::string VecToString<std::string>(const std::vector<std::string> &vec,
return oss.str();
}
} // namespace
std::string OnlineRecognizerResult::AsJsonString() const {
std::ostringstream os;
os << "{ ";