Development discussion. Logged to https://ddnet.tw/irclogs/ Connected with DDNet's IRC channel, Matrix room and GitHub repositories — IRC: #ddnet on Quakenet | Matrix: #ddnet-developer:matrix.org GitHub: https://github.com/ddnet
Between 2021-10-08 00:00:00Z and 2021-10-09 00:00:00Z
bro @Deleted User can you just send correct code for https://github.com/ddnet/ddnet/pull/4173#issuecomment-938046483i am super confused. Why should the string getter be responsible for reallocating memory? Shouldn't that happen already when getting the data. And how is this no issue for the json version?
Adds ResultStr() which returns a null terminated string. So the http code can be used to do plaintext requests not only json.
Checklist
Tested the change ingame
Provided screenshots if it is a v...
well what should i fix?
I personally would just implement a Job that fetches text data, that also wouldnt require to be in the ddnet code
Else i would take a buffer as parameter, e.g. a std::string and fill that on demandIf you absolutly dont want todo it, change the buffer reallocation as i said in the comment(imo the worst solution, bcs it's not intuitive)