mirror of
https://github.com/asdlokj1qpi233/subconverter.git
synced 2025-10-27 20:03:01 +00:00
Bug fixes
Fix compile error on MacOS. Speed up generation of Clash configuration.
This commit is contained in:
7
misc.cpp
7
misc.cpp
@@ -759,13 +759,6 @@ void shortDisassemble(int source, unsigned short &num_a, unsigned short &num_b)
|
||||
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 retval = 0;
|
||||
|
||||
1
misc.h
1
misc.h
@@ -51,7 +51,6 @@ void urlParse(std::string url, std::string &host, std::string &path, int &port,
|
||||
void removeUTF8BOM(std::string &data);
|
||||
int shortAssemble(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);
|
||||
|
||||
std::string fileGet(std::string path, bool binary = true);
|
||||
|
||||
@@ -585,7 +585,7 @@ std::string netchToClash(std::vector<nodeInfo> &nodes, std::string &base_conf, s
|
||||
|
||||
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)
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
#include <cstdint>
|
||||
#include <iostream>
|
||||
#include <evhttp.h>
|
||||
#ifdef MALLOC_TRIM
|
||||
#include <malloc.h>
|
||||
#endif // MALLOC_TRIM
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
Reference in New Issue
Block a user