From bfaf7e3b27981a5144faba6d17c6e29fac735dbb Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 13 Feb 2008 18:22:19 +0000 Subject: Commit patch from danieldg that makes a ton of stuff const-safe for latest warn-happy trigger-happy gcc4 (thanks) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8922 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/configreader.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'src/configreader.cpp') diff --git a/src/configreader.cpp b/src/configreader.cpp index 9f7a59885..fe02bc2bd 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -160,7 +160,7 @@ void ServerConfig::Send005(User* user) user->WriteServ("005 %s %s", user->nick, line->c_str()); } -bool ServerConfig::CheckOnce(char* tag) +bool ServerConfig::CheckOnce(const char* tag) { int count = ConfValueEnum(this->config_data, tag); @@ -800,7 +800,7 @@ void ServerConfig::Read(bool bail, User* user, int pass) errstr.clear(); /* These tags MUST occur and must ONLY occur once in the config file */ - static char* Once[] = { "server", "admin", "files", "power", "options", NULL }; + static const char* Once[] = { "server", "admin", "files", "power", "options", NULL }; /* These tags can occur ONCE or not at all */ InitialConfig Values[] = { @@ -2124,12 +2124,7 @@ ValueItem::ValueItem(bool value) v = n.str(); } -ValueItem::ValueItem(char* value) -{ - v = value; -} - -void ValueItem::Set(char* value) +ValueItem::ValueItem(const char* value) { v = value; } -- cgit v1.3.1-10-gc9f91