Skip to content

Commit f27d8f1

Browse files
committed
Okay clang.
1 parent 99cf42d commit f27d8f1

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

Diff for: ruri/Aria.h

+18-3
Original file line numberDiff line numberDiff line change
@@ -1384,7 +1384,7 @@ std::string urlDecode(const std::string_view SRC){
13841384
return ret;
13851385
}
13861386

1387-
1387+
/*
13881388
#define PACK(Name,Type)pack<Type, ""#Name##_HU>{}
13891389
template<typename T, u32 Hash_Value>
13901390
struct pack {
@@ -1423,10 +1423,13 @@ auto get_param_sbind(_GetParams &&a, const T& ...Output){
14231423
return decltype(T::type){};
14241424
}()
14251425
)...};
1426-
}
1426+
}*/
14271427

14281428
void osu_getScores(const _HttpRes& http, _Con s){
14291429

1430+
auto PARAMS = _GetParams(http.Host);
1431+
1432+
/*
14301433
auto [LeaderBoardVersion, LType, BeatmapMD5, FileName, Mode,
14311434
SetID, Mods, UserName_View, Password_View] = get_param_sbind(_GetParams(http.Host),
14321435
PACK("vv", int), PACK("v", int),
@@ -1436,7 +1439,19 @@ void osu_getScores(const _HttpRes& http, _Con s){
14361439
PACK("mods", u32),
14371440
PACK("us", std::string_view),
14381441
PACK("ha", std::string_view)
1439-
);
1442+
);*/
1443+
1444+
const auto LeaderBoardVersion = StringToNum(int, PARAMS.get<"vv"_HU>());
1445+
const auto LType = StringToNum(int, PARAMS.get<"v"_HU>());
1446+
1447+
const auto BeatmapMD5 = PARAMS.get<"c"_HU>();
1448+
const auto FileName = PARAMS.get<"f"_HU>();
1449+
auto Mode = StringToNum(u32, PARAMS.get<"m"_HU>());
1450+
const auto SetID = StringToNum(u32, PARAMS.get<"i"_HU>());
1451+
const auto Mods = StringToNum(u32, PARAMS.get<"mods"_HU>());
1452+
const auto UserName_View = PARAMS.get<"us"_HU>();
1453+
const auto Password_View = PARAMS.get<"ha"_HU>();
1454+
14401455

14411456
if (unlikely(LeaderBoardVersion != 4 || BeatmapMD5.size() != 32 || http.GetHeaderValue("Host") != " osu.ppy.sh"))
14421457
return SendAria404(s);

0 commit comments

Comments
 (0)