diff --git a/config.cpp b/config.cpp index 56af419..693f3c1 100644 --- a/config.cpp +++ b/config.cpp @@ -1,7 +1,6 @@ #include "config.hpp" #include #include -#include #include #include diff --git a/discord.cpp b/discord.cpp index 10255f5..024020e 100644 --- a/discord.cpp +++ b/discord.cpp @@ -1,9 +1,6 @@ #include "config.hpp" #include -#include -#include #include -#include #include #include @@ -18,17 +15,17 @@ void Shutdown(int sig) { } // handle discord ready event -static void handleDiscordReady(const DiscordUser *u) { +void handleDiscordReady(const DiscordUser *u) { printf("\nDisplaying Presence for %s#%s\n", u->username, u->discriminator); } // handle discord disconnected event -static void handleDiscordDisconnected(int errcode, const char *message) { +void handleDiscordDisconnected(int errcode, const char *message) { printf("\nDiscord: disconnected (%d: %s)\n", errcode, message); } // handle discord error event -static void handleDiscordError(int errcode, const char *message) { +void handleDiscordError(int errcode, const char *message) { printf("\nDiscord: error (%d: %s)\n", errcode, message); Shutdown(1); } @@ -72,8 +69,7 @@ void updatePresence(config_t *c) { if (c->end_time >= 0 && c->end_time != 0LL) discordPresence.endTimestamp = (int64_t)c->end_time; - // make sure not to set the optional variables if they are not defined in - // the config + // dont set optional variables if they are not defined in the config if (c->small_img.key.length() >= 1) discordPresence.smallImageKey = c->small_img.key.c_str(); if (c->small_img.text.length() >= 1) @@ -89,7 +85,7 @@ void refreshDiscord() { // manually handle this Discord_UpdateConnection(); - // handle callbacks + // callbacks Discord_RunCallbacks(); } diff --git a/main.cpp b/main.cpp index 9d52f17..2f266aa 100644 --- a/main.cpp +++ b/main.cpp @@ -2,11 +2,8 @@ #include "discord.hpp" #include #include -#include #include -#define CONFIG_PATH "config.ini" - int main(void) { // define when to shutdown signal(SIGINT, Shutdown); diff --git a/meson.build b/meson.build index d19c534..d3f8cc3 100644 --- a/meson.build +++ b/meson.build @@ -1,6 +1,6 @@ project('EasyRP', 'cpp', version : '3.0', - default_options : ['warning_level=3']) + default_options : ['warning_level=3', 'cpp_std=c++14', 'b_ndebug=if-release']) compiler = meson.get_compiler('cpp')