From 0a049856782397a7464d03c317ce3788559cdeda Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Fri, 2 Sep 2022 01:25:33 -0400 Subject: make compile work if voice support is disabled --- src/discord/voiceclient.hpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/discord/voiceclient.hpp') diff --git a/src/discord/voiceclient.hpp b/src/discord/voiceclient.hpp index 615bbde..4b988d5 100644 --- a/src/discord/voiceclient.hpp +++ b/src/discord/voiceclient.hpp @@ -1,4 +1,6 @@ #pragma once +#ifdef WITH_VOICE +// clang-format off #include "snowflake.hpp" #include "waiter.hpp" #include "websocket.hpp" @@ -6,6 +8,7 @@ #include #include #include +// clang-format on enum class VoiceGatewayCloseCode : uint16_t { UnknownOpcode = 4001, @@ -124,11 +127,11 @@ public: private: void ReadThread(); -#ifdef _WIN32 + #ifdef _WIN32 SOCKET m_socket; -#else + #else int m_socket; -#endif + #endif sockaddr_in m_server; std::atomic m_running = false; @@ -203,3 +206,4 @@ private: Waiter m_heartbeat_waiter; std::thread m_heartbeat_thread; }; +#endif -- cgit v1.2.3