






std::optional everywhere?









std::optional








abs if the server doesn't specify that it's doing time scores?









CServer::UpdateRegisterServerInfo
m_aClients[i].m_Score == -1 ? -9999 : m_aClients[i].m_Score


























git reset โhard origin/pr_fix_info; git rebase -i upstream/mastere instead of pick
git reset โhard HEAD, get out, git commit โamend, git rebase โcontinue and a force push to finish it up

































"client_score_kind": "time"
"tw-0.6+udp://5.181.124.84:8303"


https://master1.ddnet.org/ddnet/15/servers.json






"tw-0.6+udp://5.181.124.84:8303" is on your latest master? @Avolicious


"tw-0.6+udp://5.181.124.84:8303" is on your latest master? @Avolicious 






UpdateRegisterServerInfo is where the flag gets set









client_score_kind change was merged just after the last KoG release
2

ADD_INT(q, !m_aClients[i].m_Score.has_value() ? -9999 : m_aClients[i].m_Score.value() == 9999 ? -10000 : -m_aClients[i].m_Score.value()); // client scorem_aClients[i].m_Score.value_or(-9999)








transform







absolute should probably be removed there

absolutes and think about whether we want negative or positive numbers, probably positive ones

absolute should probably be removed there 



-1 * m_Score.value() or -m_Score.value()

m_Score = Result.m_Data.m_Info.m_Time;public: template<>
enable_if_t<__and_v<__not_<is_same<int, float>>, is_constructible<int, const float &>, is_assignable<int &, const float &>, __not_<__converts_from_optional<int, float>>, __not_<__assigns_from_optional<int, float>>>, std::optional<int> &> operator=<float>(const optional<float> &__u) noexcept(__and_v<is_nothrow_constructible<int, const float &>, is_nothrow_assignable<int &, const float &>>)
map you've been looking for 





sv_register_urlsv_register_url http://[::1]:8080/ddnet/15/register (edited)http_allow_insecure 1



ddnet-serverlist-urls.cfg


python -m http.server would work

http_allow_insecure 1 ^^

sv_register_url http://[::1]:8080/ddnet/15/register (edited)sv_register_url





python -m http.server would work 























































"Any fool can write code that computers understand. A good programmer writes code that humans can understand" - Martin Fowler






str_find_nocase(pEntry->m_Info.m_aGameType, "race")


str_find_nocase(pEntry->m_Info.m_aGameType, "race") 










bool() on it?os.walk() gets a topdown boolean argumentif, so it's interpreted as if bool was called on it (edited)
open
json.dump
open does indeed take a boolean, but it seems to be implemented in _pyio.pyjson.dump is kinda useless









c++
float not_confusing_at_all (float x){
float xhalf = 0.5f*x;
int i = *(int*)&x;
i = 0x5f3759df - (i>>1);
x = *(float*)&i;
x = x*(1.5f - xhalf*x*x);
return x;
}




int i = *(int*)&x;
int i = (int)x;









int i = *(int*)&x;
int i = (int)x; 



































c++
float not_confusing_at_all (float x){
float xhalf = 0.5f*x;
int i = *(int*)&x;
i = 0x5f3759df - (i>>1);
x = *(float*)&i;
x = x*(1.5f - xhalf*x*x);
return x;
} 



















































float x; int *y = (int *)x; *y = 0; is UB in C (edited)












float x; int *y = (int *)x; *y = 0; is UB in C (edited)




float x; &x + 3; is UB

x + 3 isn't UB for most values of an integer
intptr_t or uintptr_t. But not much else





& and &mut pointers which work without unsafe blocks


const raw pointer to a place, without creating an intermediate reference.










& and &mut pointers which work without unsafe blocks 


















&mut/& is called "reference"







&mut/& is called "reference" *mut T would be called a pointer though, no? There must be a reason they differentiate between the two
















n & 0xB4 == 0xB4 and n >= 0xB4? 





































< and > and then split according to what's in between, because there are multiple garbages prepended












float x; &x + 3; is UB 






















void *x; *x += 3; (edited)
&x + 3 gets you outside the 1 float you declared, even creating such a pointer is deemed UB




nullptr isn't even an lvalue







sizeof *x bytes out. So you are indeed outside
808d604 Propagate list box active state to underlying scroll region - Robyt3
e175c0a Remove duplicate enter hotkey used for connecting to server - Robyt3
59fafdb Only activate server browser list box when no popup is open - Robyt3
0d0f9ed Remove dead code - Robyt3
9be72db Remove unnecessary margin on left side of server filter - Robyt3
f16f77c Slightly decrease size of country flag in server filter - Robyt3
4dcb80e Enable country button also when filter not enabled - Robyt3
83c19a1 Add highlight color when hovering country button of server filter - Robyt3
23d8acd Replace country server filter fullscreen popup with smaller popup - Robyt3
bf7469f Merge #6649 - bors[bot]




