diff options
author | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-11-23 19:12:20 +0000 |
---|---|---|
committer | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-11-23 19:12:20 +0000 |
commit | 8431ac369b2f12ac376798fb01748f52d327164a (patch) | |
tree | 383144a0a102038cf5fd1aaf780f9594ffb376f1 /src/sessions.c | |
parent | 5950b11a0f4903cd07c0068a428f499dd64bdd2b (diff) |
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
Diffstat (limited to 'src/sessions.c')
-rw-r--r-- | src/sessions.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/sessions.c b/src/sessions.c index 83c7d8474..3c882032d 100644 --- a/src/sessions.c +++ b/src/sessions.c @@ -345,7 +345,7 @@ void expire_exceptions(void) nexceptions--; memmove(exceptions + i, exceptions + i + 1, sizeof(Exception) * (nexceptions - i)); - exceptions = (Exception *)srealloc(exceptions, sizeof(Exception) * nexceptions); + exceptions = static_cast<Exception *>(srealloc(exceptions, sizeof(Exception) * nexceptions)); i--; } } @@ -411,7 +411,7 @@ void load_exceptions() case 7: SAFE(read_int16(&n, f)); nexceptions = n; - exceptions = (Exception *)scalloc(sizeof(Exception) * nexceptions, 1); + exceptions = static_cast<Exception *>(scalloc(sizeof(Exception) * nexceptions, 1)); if (!nexceptions) { close_db(f); return; @@ -505,7 +505,7 @@ int exception_add(User * u, const char *mask, const int limit, } nexceptions++; - exceptions = (Exception *)srealloc(exceptions, sizeof(Exception) * nexceptions); + exceptions = static_cast<Exception *>(srealloc(exceptions, sizeof(Exception) * nexceptions)); exceptions[nexceptions - 1].mask = sstrdup(mask); exceptions[nexceptions - 1].limit = limit; @@ -530,7 +530,7 @@ static int exception_del(const int index) nexceptions--; memmove(exceptions + index, exceptions + index + 1, sizeof(Exception) * (nexceptions - index)); - exceptions = (Exception *)srealloc(exceptions, sizeof(Exception) * nexceptions); + exceptions = static_cast<Exception *>(srealloc(exceptions, sizeof(Exception) * nexceptions)); return 1; } @@ -775,7 +775,7 @@ int do_exception(User * u) if ((n1 >= 0 && n1 < nexceptions) && (n2 >= 0 && n2 < nexceptions) && (n1 != n2)) { - exception = (Exception *)smalloc(sizeof(Exception)); + exception = static_cast<Exception *>(smalloc(sizeof(Exception))); memcpy(exception, &exceptions[n1], sizeof(Exception)); if (n1 < n2) { |