Skip to content

Commit

Permalink
get rid, cant make this work in vs
Browse files Browse the repository at this point in the history
  • Loading branch information
braindigitalis committed Oct 4, 2024
1 parent 8dcb87e commit 1df9584
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 32 deletions.
4 changes: 3 additions & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,9 @@
"khanda",
"oclock",
"moai",
"xbps"
"xbps",
"Krystian",
"Stasiowski"
],
"flagWords": [
"hte"
Expand Down
25 changes: 0 additions & 25 deletions include/dpp/convert_to.h

This file was deleted.

1 change: 0 additions & 1 deletion include/dpp/dpp.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,3 @@
#include <dpp/timed_listener.h>
#include <dpp/collector.h>
#include <dpp/bignum.h>
#include <dpp/convert_to.h>
9 changes: 4 additions & 5 deletions src/dpp/voice/enabled/discover_ip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

#include <dpp/exception.h>
#include <dpp/discordvoiceclient.h>
#include <dpp/convert_to.h>
#include "enabled.h"

#ifdef _WIN32
Expand Down Expand Up @@ -92,19 +91,19 @@ std::string discord_voice_client::discover_ip() {
servaddr.sin_family = AF_INET;
servaddr.sin_addr.s_addr = htonl(INADDR_ANY);
servaddr.sin_port = htons(0);
if (bind(socket.fd, convert_to<sockaddr_in*, const sockaddr*>(&servaddr), sizeof(servaddr)) < 0) {
if (bind(socket.fd, (const sockaddr*)(&servaddr), sizeof(servaddr)) < 0) {
log(ll_warning, "Could not bind socket for IP discovery");
return "";
}
memset(&servaddr, 0, sizeof(servaddr));
servaddr.sin_family = AF_INET;
servaddr.sin_port = htons(this->port);
servaddr.sin_addr.s_addr = inet_addr(this->ip.c_str());
if (::connect(socket.fd, convert_to<sockaddr_in*, const sockaddr*>(&servaddr), sizeof(sockaddr_in)) < 0) {
if (::connect(socket.fd, (const sockaddr*)(&servaddr), sizeof(sockaddr_in)) < 0) {
log(ll_warning, "Could not connect socket for IP discovery");
return "";
}
if (::send(socket.fd, convert_to<ip_discovery_packet*, const char*>(&discovery), sizeof(discovery), 0) == -1) {
if (::send(socket.fd, (const char*)(&discovery), sizeof(discovery), 0) == -1) {
log(ll_warning, "Could not send packet for IP discovery");
return "";
}
Expand All @@ -121,7 +120,7 @@ std::string discord_voice_client::discover_ip() {
log(ll_warning, "Timed out in IP discovery");
return "";
default:
if (recv(socket.fd, convert_to<ip_discovery_packet*, char*>(&discovery), sizeof(discovery), 0) == -1) {
if (recv(socket.fd, (char*)(&discovery), sizeof(discovery), 0) == -1) {
log(ll_warning, "Could not receive packet for IP discovery");
return "";
}
Expand Down

0 comments on commit 1df9584

Please sign in to comment.