mirror of
https://github.com/MatsuriDayo/nekoray.git
synced 2025-12-18 04:54:38 +03:00
fix warning
This commit is contained in:
@@ -5,11 +5,11 @@
|
||||
|
||||
namespace NekoRay::fmt {
|
||||
|
||||
#define DECODE_V2RAY_N_1 \
|
||||
auto linkN = DecodeB64IfValid(SubStrBefore(SubStrAfter(link, "://"), "#"), QByteArray::Base64Option::Base64UrlEncoding); \
|
||||
if (linkN.isEmpty()) return false; \
|
||||
auto hasRemarks = link.contains("#"); \
|
||||
if (hasRemarks) linkN += "#" + SubStrAfter(link, "#"); \
|
||||
#define DECODE_V2RAY_N_1 \
|
||||
QString linkN = DecodeB64IfValid(SubStrBefore(SubStrAfter(link, "://"), "#"), QByteArray::Base64Option::Base64UrlEncoding); \
|
||||
if (linkN.isEmpty()) return false; \
|
||||
auto hasRemarks = link.contains("#"); \
|
||||
if (hasRemarks) linkN += "#" + SubStrAfter(link, "#"); \
|
||||
auto url = QUrl("https://" + linkN);
|
||||
|
||||
bool SocksHttpBean::TryParseLink(const QString &link) {
|
||||
|
||||
@@ -170,6 +170,7 @@ namespace NekoRay::sub {
|
||||
try {
|
||||
return n.as<std::string>().c_str();
|
||||
} catch (const YAML::Exception &ex) {
|
||||
qDebug() << ex.what();
|
||||
return def;
|
||||
}
|
||||
}
|
||||
@@ -178,6 +179,7 @@ namespace NekoRay::sub {
|
||||
try {
|
||||
return n.as<int>();
|
||||
} catch (const YAML::Exception &ex) {
|
||||
qDebug() << ex.what();
|
||||
return def;
|
||||
}
|
||||
}
|
||||
@@ -186,6 +188,7 @@ namespace NekoRay::sub {
|
||||
try {
|
||||
return n.as<bool>();
|
||||
} catch (const YAML::Exception &ex) {
|
||||
qDebug() << ex.what();
|
||||
return def;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user