Skip to content

Commit

Permalink
Fix some compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
AppleDash committed Oct 7, 2015
1 parent 4c827e0 commit d1e5c34
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
8 changes: 4 additions & 4 deletions include/module.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ class Module {
public:
Module() { }
virtual ~Module() { }
virtual void OnIRCRaw(Line line) { }
virtual void OnPrivateMessage(Hostmask source, std::string message) { }
virtual void OnChannelMessage(Hostmask source, std::string channel, std::string message) { }
virtual void OnIRCCommand(Hostmask source, std::string target, std::string cmd, std::vector<std::string> args) { }
virtual void OnIRCRaw(Line line) { UNUSED(line); }
virtual void OnPrivateMessage(Hostmask source, std::string message) { UNUSED(source); UNUSED(message); }
virtual void OnChannelMessage(Hostmask source, std::string channel, std::string message) { UNUSED(source); UNUSED(channel); UNUSED(message); }
virtual void OnIRCCommand(Hostmask source, std::string target, std::string cmd, std::vector<std::string> args) { UNUSED(source); UNUSED(target); UNUSED(cmd); UNUSED(args); }
Bot *bot;
};
2 changes: 2 additions & 0 deletions include/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
#include <string>
#include <vector>

#define UNUSED(param) (void)param

std::vector<std::string> split_string(std::string str, std::string delimiter);
1 change: 1 addition & 0 deletions modules/include/m_test.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#pragma once
#include <iostream>

#include "utils.h"
#include "module.h"

using std::cout;
Expand Down
2 changes: 1 addition & 1 deletion src/botframe.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "botframe.h"

Bot::Bot() : config("bot.config"), cmd_prefix("!") {
Bot::Bot() : cmd_prefix("!"), config("bot.config") {
std::string host;
int port;

Expand Down
1 change: 1 addition & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "utils.h"

int main(int argc, char *argv[]) {
UNUSED(argc); UNUSED(argv);
Bot bot;

bot.Go();
Expand Down

0 comments on commit d1e5c34

Please sign in to comment.