From 6f8c73f8ba510e8101302674ab4451b9e93f5575 Mon Sep 17 00:00:00 2001 From: CodemodService Bot Date: Wed, 7 May 2025 21:12:41 -0700 Subject: [PATCH] [Codemod][[cqs] Fix CQS signal. Id] 55563409 -- performance-faster-string-find in fbcode/pytorch/audio/src/libtorchaudio/sox (#3906) Summary: Pull Request resolved: https://github.com/pytorch/audio/pull/3906 Reviewed By: dtolnay Differential Revision: D74236246 --- src/libtorchaudio/sox/utils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libtorchaudio/sox/utils.cpp b/src/libtorchaudio/sox/utils.cpp index 80747816c7..94748c5209 100644 --- a/src/libtorchaudio/sox/utils.cpp +++ b/src/libtorchaudio/sox/utils.cpp @@ -195,7 +195,7 @@ torch::Tensor convert_to_tensor( } const std::string get_filetype(const std::string& path) { - std::string ext = path.substr(path.find_last_of(".") + 1); + std::string ext = path.substr(path.find_last_of('.') + 1); std::transform(ext.begin(), ext.end(), ext.begin(), ::tolower); return ext; }