Skip to content

Commit

Permalink
clang tidy check: remove redundant .c_str()
Browse files Browse the repository at this point in the history
  • Loading branch information
jcdr428 committed Aug 9, 2023
1 parent 01edc8b commit 7738dac
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tsMuxer/singleFileMuxer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,8 @@ void SingleFileMuxer::writeOutBuffer(StreamInfo* streamInfo)
streamInfo->m_file.open(streamInfo->m_fileName.c_str(), File::ofWrite + File::ofNoTruncate);
lpcmReader->beforeFileCloseEvent(streamInfo->m_file);
streamInfo->m_file.close();
const std::string newName = getNewName(streamInfo->m_fileName.c_str(), streamInfo->m_part);
deleteFile(newName.c_str());
const std::string newName = getNewName(streamInfo->m_fileName, streamInfo->m_part);
deleteFile(newName);
if (rename(streamInfo->m_fileName.c_str(), newName.c_str()) != 0)
THROW(ERR_COMMON, "Can't rename file " << streamInfo->m_fileName << " to " << newName);
streamInfo->m_part++;
Expand Down Expand Up @@ -315,8 +315,8 @@ bool SingleFileMuxer::close()

if (streamInfo->m_part > 1)
{
std::string newName = getNewName(streamInfo->m_fileName.c_str(), streamInfo->m_part);
deleteFile(newName.c_str());
std::string newName = getNewName(streamInfo->m_fileName, streamInfo->m_part);
deleteFile(newName);
if (rename(streamInfo->m_fileName.c_str(), newName.c_str()) != 0)
THROW(ERR_COMMON, "Can't rename file " << streamInfo->m_fileName << " to " << newName);
}
Expand Down

0 comments on commit 7738dac

Please sign in to comment.