mirror of
https://github.com/asdlokj1qpi233/subconverter.git
synced 2026-11-03 02:02:24 +00:00
Bug fixes
Fix compile error on MacOS. Speed up generation of Clash configuration.
This commit is contained in:
4 files changed
+3
-9
No files matched your search
@@ -759,13 +759,6 @@ void shortDisassemble(int source, unsigned short &num_a, unsigned short &num_b)
|
|||||||
num_b = (unsigned short)(source >> 16);
|
num_b = (unsigned short)(source >> 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string to_string(const YAML::Node &node)
|
|
||||||
{
|
|
||||||
std::stringstream ss;
|
|
||||||
ss << node;
|
|
||||||
return ss.str();
|
|
||||||
}
|
|
||||||
|
|
||||||
int to_int(std::string &s, int def_vaule)
|
int to_int(std::string &s, int def_vaule)
|
||||||
{
|
{
|
||||||
int retval = 0;
|
int retval = 0;
|
||||||
|
|||||||
@@ -51,7 +51,6 @@ void urlParse(std::string url, std::string &host, std::string &path, int &port,
|
|||||||
void removeUTF8BOM(std::string &data);
|
void removeUTF8BOM(std::string &data);
|
||||||
int shortAssemble(unsigned short num_a, unsigned short num_b);
|
int shortAssemble(unsigned short num_a, unsigned short num_b);
|
||||||
void shortDisassemble(int source, unsigned short &num_a, unsigned short &num_b);
|
void shortDisassemble(int source, unsigned short &num_a, unsigned short &num_b);
|
||||||
std::string to_string(const YAML::Node &node);
|
|
||||||
int to_int(std::string &s, int def_vaule = 0);
|
int to_int(std::string &s, int def_vaule = 0);
|
||||||
|
|
||||||
std::string fileGet(std::string path, bool binary = true);
|
std::string fileGet(std::string path, bool binary = true);
|
||||||
|
|||||||
+1
-1
@@ -585,7 +585,7 @@ std::string netchToClash(std::vector<nodeInfo> &nodes, std::string &base_conf, s
|
|||||||
|
|
||||||
rulesetToClash(yamlnode, ruleset_content_array);
|
rulesetToClash(yamlnode, ruleset_content_array);
|
||||||
|
|
||||||
return to_string(yamlnode);
|
return YAML::Dump(yamlnode);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string netchToSurge(std::vector<nodeInfo> &nodes, std::string &base_conf, std::vector<ruleset_content> &ruleset_content_array, string_array &extra_proxy_group, int surge_ver, extra_settings &ext)
|
std::string netchToSurge(std::vector<nodeInfo> &nodes, std::string &base_conf, std::vector<ruleset_content> &ruleset_content_array, string_array &extra_proxy_group, int surge_ver, extra_settings &ext)
|
||||||
|
|||||||
@@ -2,7 +2,9 @@
|
|||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <evhttp.h>
|
#include <evhttp.h>
|
||||||
|
#ifdef MALLOC_TRIM
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
|
#endif // MALLOC_TRIM
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|||||||
Reference in new issue
Block a user