clippy fix --self
*.hpp
glob to the set_src
function in CMakeLists.txt
CMakeLists.txt
using json = nlohmann::json;
static size_t WriteCallback(void *contents, size_t size, size_t nmemb, void *userp)
{
((std::string*)userp)->append((char*)contents, size * nmemb);
return size * nmemb;
}
json KeHubTest::getJoke() {
CURL *curl;
CURLcode res;
std::string response;
json joke;
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "https://official-joke-api.appspot.com/random_joke");
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response);
res = curl_easy_perform(curl);
if(res != CURLE_OK) {
std::cerr << "curl_easy_perform() failed: " << curl_easy_strerror(res) << std::endl;
curl_easy_cleanup(curl);
return joke;
}
curl_easy_cleanup(curl);
}
joke = json::parse(response);
return joke;
}
using json = nlohmann::json;
static size_t WriteCallback(void *contents, size_t size, size_t nmemb, void *userp)
{
((std::string*)userp)->append((char*)contents, size * nmemb);
return size * nmemb;
}
json KeHubTest::getJoke() {
CURL *curl;
CURLcode res;
std::string response;
json joke;
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "https://official-joke-api.appspot.com/random_joke");
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response);
res = curl_easy_perform(curl);
if(res != CURLE_OK) {
std::cerr << "curl_easy_perform() failed: " << curl_easy_strerror(res) << std::endl;
curl_easy_cleanup(curl);
return joke;
}
curl_easy_cleanup(curl);
}
joke = json::parse(response);
return joke;
}
Response["setup"]
to get the one string, and Response["punchline"]
for the other oneResponse["setup"]
to get the one string, and Response["punchline"]
for the other one [build] In file included from D:\Projects\KeHub\src\engine\gfx\image_manipulation.cpp:2:0:
[build] D:/Projects/KeHub/src/base/math.h:10:12: error: 'std::clamp' has not been declared
[build] using std::clamp;
[build] ^~~~~
where gcc.exe
[target.x86_64-pc-windows-gnu]
linker = "C:\\msys2\\mingw64\\bin\\gcc.exe"
ar = "C:\\msys2\\mingw64\\bin\\ar.exe"
pacman -Syyu
pacman -S pacboy
so you don't have to use these weird ass package namespacman -Syyu
pacman -S pacboy
pactoys
not pacboy sorrypactoys
not pacboy sorry pacboy -S gcc:u cmake:u ninja:u glslang:u
I think these are all you need to compile ddnet (edited)pacboy -S gcc:u cmake:u ninja:u glslang:u
I think these are all you need to compile ddnet (edited)gcc --version
rustup set default-host x86_64-pc-windows-gnu
mkdir build2
-> cd build2
-> cmake -GNinja ..
C:
is mounted at /c/
"
on global pathsecho '$(cygpath -u $USERPROFILE)/.cargo/bin:${PATH}' >> $HOME/.bash_profile
do this restart your ucrt64nano $HOME/.bash_profile
remove that cargo line at the very bottom/c/Users/kio/.cargo/bin:
rustup-init.exe
?echo %PATH%
?echo '$(cygpath -u $USERPROFILE)/.cargo/bin:${PATH}' >> $HOME/.bash_profile
do this restart your ucrt64 echo '$(cygpath -u $USERPROFILE)/.cargo/bin:${PATH}'
echo "$(cygpath -u $USERPROFILE)/.cargo/bin:${PATH}"
echo 'PATH=$(cygpath -u $USERPROFILE)/.cargo/bin:${PATH}' >> $HOME/.bash_profile
forgot the PATH=
echo 'PATH=$(cygpath -u $USERPROFILE)/.cargo/bin:${PATH}' >> $HOME/.bash_profile
forgot the PATH=
rm -rf *; cmake -GNinja ..
ninja game-client
Severity Code Description Project File Line Suppression State
Severity Code Description Project File Line Suppression State
Error (active) E0020 identifier "SOCKET" is undefined game-server C:\Program Files\mysql\include\mysql_com.h 333
Error C3646 'fd': unknown override specifier (compiling source file \src\engine\server\databases\mysql.cpp) game-server C:\Program Files\mysql\include\mysql_com.h 333
rustup show
rustup toolchain install stable-x86_64-pc-windows-gnu
(edited)echo "[target.x86_64-pc-windows-gnu]#linker = \"$(cygpath -w $(which gcc))\"#ar = \"$(cygpath -w $(which ar))\"" | tr '#' '\n' | sed 's/\\/\\\\/g' > $(cygpath -u $USERPROFILE)/.cargo/config
echo -e
rm -rf *; cmake -GNinja ..
ninja game-client
rustup show
again?rustup default stable-gnu
or sth idkrestart
command added in #6577), the game window is entirely missing with
d9307ca
Use FileExists
/fs_is_file
instead of opening file - Robyt3
cda3575
Quit client when existing config file cannot be loaded - Robyt3
aced53c
Uninitialize entire client before restarting - Robyt3
95b0f8c
Add restart
command to client - Robyt3
c8b69dd
Properly uninitialize all client components - Robyt3
21410e5
Merge #6577 - bors[bot]