Skip to content

Commit

Permalink
clang tidy check: write escaped string literals as raw strings
Browse files Browse the repository at this point in the history
  • Loading branch information
jcdr428 committed Aug 9, 2023
1 parent 8709013 commit 7fad1da
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions libmediation/fs/osdep/directory_win32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ bool createDir(const std::string& dirName, const bool createParentDirs)
const bool ok = preCreateDir(
[](auto&& parentDir) {
return parentDir.empty() || parentDir[parentDir.size() - 1] == ':' || parentDir == "\\\\." ||
parentDir == "\\\\.\\" || // UNC patch prefix
(strStartWith(parentDir, "\\\\.\\") && parentDir[parentDir.size() - 1] == '}'); // UNC patch prefix
parentDir == R"(\\.\)" || // UNC patch prefix
(strStartWith(parentDir, R"(\\.\)") && parentDir[parentDir.size() - 1] == '}'); // UNC patch prefix
},
[](auto&& parentDir) {
if (CreateDirectory(toWide(parentDir).data(), nullptr) == 0)
Expand Down
2 changes: 1 addition & 1 deletion libmediation/types/types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const std::regex& invalidChars()
#else
// <>:"/|?\*, ASCII 0 to 31 and all reserved names such as CON or LPT1
// see here: https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file#naming-conventions
"[:<>\"/|?\\*\\x00-\\x1F]|^CON$|^PRN$|^AUX$|^NUL$|^COM\\d$|^LPT\\d$"
R"([:<>"/|?\*\x00-\x1F]|^CON$|^PRN$|^AUX$|^NUL$|^COM\d$|^LPT\d$)"
#endif
,
std::regex_constants::ECMAScript | std::regex_constants::optimize);
Expand Down
8 changes: 4 additions & 4 deletions tsMuxer/tsPacket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -498,10 +498,10 @@ void CLPIStreamInfo::ISRC(BitStreamReader& reader)

void CLPIStreamInfo::composeISRC(BitStreamWriter& writer)
{
writeString("\x30\x30", writer, 2); // country_code
writeString("\x30\x30\x30", writer, 3); // copyright_holder
writeString("\x30\x30", writer, 2); // recording_year
writeString("\x30\x30\x30\x30\x30", writer, 5); // recording_number
writeString(R"(00)", writer, 2); // country_code
writeString(R"(000)", writer, 3); // copyright_holder
writeString(R"(00)", writer, 2); // recording_year
writeString(R"(00000)", writer, 5); // recording_number
}

void CLPIStreamInfo::parseStreamCodingInfo(BitStreamReader& reader)
Expand Down

0 comments on commit 7fad1da

Please sign in to comment.