1
0
mirror of https://github.com/anope/anope.git synced 2026-06-30 00:36:37 +02:00

Converted many C-style casts to C++-style casts.

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1788 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
cyberbotx
2008-11-23 19:12:20 +00:00
parent 5950b11a0f
commit 8431ac369b
65 changed files with 318 additions and 318 deletions
+3 -3
View File
@@ -51,7 +51,7 @@ static int moduleCopyFile(const char *name, const char *output)
strncat(input, MODULE_EXT, 4095 - len);
#ifndef _WIN32
if ((srcfp = mkstemp((char *)output)) == -1)
if ((srcfp = mkstemp(const_cast<char *>(output))) == -1)
return MOD_ERR_FILE_IO;
#else
if (!mktemp(output))
@@ -160,7 +160,7 @@ int ModuleManager::LoadModule(const std::string &modname, User * u)
}
ano_modclearerr();
func = (Module *(*)(const std::string &))ano_modsym(handle, "init_module");
func = reinterpret_cast<Module *(*)(const std::string &)>(ano_modsym(handle, "init_module"));
if (func == NULL && (err = ano_moderr()) != NULL)
{
alog("No magical init function found, not an Anope module");
@@ -263,7 +263,7 @@ void ModuleManager::DeleteModule(Module *m)
handle = m->handle;
ano_modclearerr();
destroy_func = (void(*)(Module *m))ano_modsym(m->handle, "destroy_module");
destroy_func = reinterpret_cast<void (*)(Module *)>(ano_modsym(m->handle, "destroy_module"));
if (destroy_func == NULL && (err = ano_moderr()) != NULL)
{
alog("No magical destroy function found, chancing delete...");