mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-03-02 20:20:54 +08:00
AI automatically translates all comments in the code into English (#3917)
This commit is contained in:
@@ -107,7 +107,8 @@ void process_file(const char *file) {
|
||||
File::saveFile(str, file);
|
||||
}
|
||||
|
||||
/// 这个程序是为了统一替换tab为4个空格
|
||||
// / 这个程序是为了统一替换tab为4个空格 [AUTO-TRANSLATED:ecb3b523]
|
||||
// / This program is for unified replacement of tabs with 4 spaces
|
||||
int main(int argc, char *argv[]) {
|
||||
CMD_main cmd_main;
|
||||
try {
|
||||
@@ -127,26 +128,31 @@ int main(int argc, char *argv[]) {
|
||||
}
|
||||
|
||||
bool no_filter = filter_set.find("*") != filter_set.end();
|
||||
//设置日志
|
||||
// 设置日志 [AUTO-TRANSLATED:50372045]
|
||||
// Set log
|
||||
Logger::Instance().add(std::make_shared<ConsoleChannel>());
|
||||
File::scanDir(path, [&](const string &path, bool isDir) {
|
||||
if (isDir) {
|
||||
return true;
|
||||
}
|
||||
if (!no_filter) {
|
||||
//开启了过滤器
|
||||
// 开启了过滤器 [AUTO-TRANSLATED:331a77dd]
|
||||
// Filter enabled
|
||||
auto pos = strstr(path.data(), ".");
|
||||
if (pos == nullptr) {
|
||||
//没有后缀
|
||||
// 没有后缀 [AUTO-TRANSLATED:2273522f]
|
||||
// No suffix
|
||||
return true;
|
||||
}
|
||||
auto ext = pos + 1;
|
||||
if (filter_set.find(ext) == filter_set.end()) {
|
||||
//后缀不匹配
|
||||
// 后缀不匹配 [AUTO-TRANSLATED:7e30f0b4]
|
||||
// Suffix does not match
|
||||
return true;
|
||||
}
|
||||
}
|
||||
//该文件匹配
|
||||
// 该文件匹配 [AUTO-TRANSLATED:9dce5098]
|
||||
// File matches
|
||||
process_file(path.data());
|
||||
return true;
|
||||
}, true);
|
||||
|
||||
Reference in New Issue
Block a user