diff --git a/source/src/log.cpp b/source/src/log.cpp index 08f6410e..3d0504ff 100644 --- a/source/src/log.cpp +++ b/source/src/log.cpp @@ -7,7 +7,7 @@ struct filelog : log { FILE *file; - filelog(char *filepath) + filelog(const char *filepath) { file = fopen(filepath, "w"); } @@ -17,7 +17,7 @@ struct filelog : log if(file) fclose(file); } - virtual void writeline(int level, char *msg, ...) + virtual void writeline(int level, const char *msg, ...) { if(!enabled) return; @@ -41,7 +41,7 @@ struct filelog : log struct syslog : log { - virtual void writeline(int level, char *msg, ...) + virtual void writeline(int level, const char *msg, ...) { } @@ -51,4 +51,4 @@ struct syslog : log struct log *newlogger() { return new filelog("serverlog.txt"); -} \ No newline at end of file +} diff --git a/source/src/protos.h b/source/src/protos.h index 83db3b1e..3fac4387 100644 --- a/source/src/protos.h +++ b/source/src/protos.h @@ -569,7 +569,7 @@ struct log log() : console(true), enabled(true) {}; virtual ~log() {}; - virtual void writeline(int level, char *msg, ...) = 0; + virtual void writeline(int level, const char *msg, ...) = 0; }; extern struct log *newlogger(); diff --git a/source/src/tools.cpp b/source/src/tools.cpp index f8d912e2..e838084f 100644 --- a/source/src/tools.cpp +++ b/source/src/tools.cpp @@ -268,4 +268,6 @@ bool isbigendian() { long one = 1; return !(*((char *)(&one))); -} \ No newline at end of file +} + +