mirror of
https://github.com/asdlokj1qpi233/subconverter.git
synced 2026-11-05 11:12:12 +00:00
Fix logic error on generating Clash rule-providers
Optimize codes.
This commit is contained in:
11 files changed
+20
-29
No files matched your search
@@ -2031,7 +2031,6 @@ void filterNodes(std::vector<nodeInfo> &nodes, string_array &exclude_remarks, st
|
||||
}
|
||||
*/
|
||||
|
||||
bool excluded, included;
|
||||
std::vector<std::unique_ptr<pcre2_code, decltype(&pcre2_code_free)>> exclude_patterns, include_patterns;
|
||||
std::vector<std::unique_ptr<pcre2_match_data, decltype(&pcre2_match_data_free)>> exclude_match_data, include_match_data;
|
||||
unsigned int i = 0;
|
||||
@@ -2061,8 +2060,7 @@ void filterNodes(std::vector<nodeInfo> &nodes, string_array &exclude_remarks, st
|
||||
writeLog(LOG_TYPE_INFO, "Filter started.");
|
||||
while(iter != nodes.end())
|
||||
{
|
||||
excluded = false;
|
||||
included = false;
|
||||
bool excluded = false, included = false;
|
||||
for(i = 0; i < exclude_patterns.size(); i++)
|
||||
{
|
||||
rc = pcre2_match(exclude_patterns[i].get(), reinterpret_cast<const unsigned char*>(iter->remarks.c_str()), iter->remarks.size(), 0, 0, exclude_match_data[i].get(), NULL);
|
||||
|
||||
Reference in new issue
Block a user