mirror of
https://github.com/asdlokj1qpi233/subconverter.git
synced 2026-11-03 02:02:24 +00:00
Optimize codes
Fix keeping UDP/TFO/Skip Cert Verify flags from original subscriptions not working. Fix compiler warning.
This commit is contained in:
8 files changed
+46
-64
No files matched your search
+1
-7
@@ -4,6 +4,7 @@
|
||||
#include <inja.hpp>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
#include "yamlcpp_extra.h"
|
||||
#include "interfaces.h"
|
||||
#include "templates.h"
|
||||
#include "logger.h"
|
||||
@@ -11,13 +12,6 @@
|
||||
|
||||
extern std::string managed_config_prefix;
|
||||
|
||||
template <typename T> T safe_as (const YAML::Node& node)
|
||||
{
|
||||
if(node.IsDefined() && !node.IsNull())
|
||||
return node.as<T>();
|
||||
return T();
|
||||
};
|
||||
|
||||
static inline void parse_json_pointer(nlohmann::json &json, const std::string &path, const std::string &value)
|
||||
{
|
||||
std::string pointer = "/" + replace_all_distinct(path, ".", "/");
|
||||
|
||||
Reference in new issue
Block a user