Squash bugs and warnings, optimise CMake builds.

This commit is contained in:
Jack Bond-Preston 2016-08-15 21:12:47 +02:00
parent 4b2d0ee50a
commit 9c7e4f5a6d
5 changed files with 13 additions and 6 deletions

6
.gitignore vendored
View File

@ -15,3 +15,9 @@ config.json
# Compiled sqlite file
sqlite3.obj
# V8 lib
lib/v8
# Built files
build/

View File

@ -52,3 +52,5 @@ include_directories(
# don't know if necessary, too scared to remove
add_definitions(-D_WEBSOCKETPP_CPP11_STL_)
set(CMAKE_BUILD_TYPE Release)

View File

@ -62,6 +62,5 @@ int main(int argc, char *argv[]) {
Logger::write("Cleaned up", Logger::LogLevel::Info);
std::getchar();
return exit_code;
}

View File

@ -15,7 +15,7 @@
#include "Logger.hpp"
#include "BotConfig.hpp"
TriviaGame::TriviaGame(BotConfig &c, GatewayHandler *gh, std::string channel_id, int total_questions, int delay) : interval(delay), config(c) {
TriviaGame::TriviaGame(BotConfig &c, GatewayHandler *gh, std::string channel_id, int total_questions, int delay) : config(c), interval(delay) {
this->gh = gh;
this->channel_id = channel_id;

View File

@ -14,7 +14,7 @@ namespace CommandHelper {
sqlite3 *db; int return_code;
return_code = sqlite3_open("bot/db/trivia.db", &db);
std::string sql = "SELECT * FROM CustomJS";
std::string sql = "SELECT GuildID, CommandName, Script FROM CustomJS";
sqlite3_stmt *stmt;
return_code = sqlite3_prepare_v2(db, sql.c_str(), -1, &stmt, 0);