From 5572a3042f3786b8b7b22bc3eb50d6de7c0a418a Mon Sep 17 00:00:00 2001 From: arm64v8a <48624112+arm64v8a@users.noreply.github.com> Date: Sun, 2 Apr 2023 14:52:52 +0900 Subject: [PATCH] fix warning --- fmt/Link2Bean.cpp | 10 +++++----- sub/GroupUpdater.cpp | 3 +++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/fmt/Link2Bean.cpp b/fmt/Link2Bean.cpp index 1cdffa2..a1a0262 100644 --- a/fmt/Link2Bean.cpp +++ b/fmt/Link2Bean.cpp @@ -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) { diff --git a/sub/GroupUpdater.cpp b/sub/GroupUpdater.cpp index 03cd109..e14b24d 100644 --- a/sub/GroupUpdater.cpp +++ b/sub/GroupUpdater.cpp @@ -170,6 +170,7 @@ namespace NekoRay::sub { try { return n.as().c_str(); } catch (const YAML::Exception &ex) { + qDebug() << ex.what(); return def; } } @@ -178,6 +179,7 @@ namespace NekoRay::sub { try { return n.as(); } catch (const YAML::Exception &ex) { + qDebug() << ex.what(); return def; } } @@ -186,6 +188,7 @@ namespace NekoRay::sub { try { return n.as(); } catch (const YAML::Exception &ex) { + qDebug() << ex.what(); return def; } }