summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/anope.h14
-rw-r--r--include/extensible.h2
-rw-r--r--modules/extra/m_httpd.cpp2
-rw-r--r--modules/extra/webcpanel/webcpanel.h2
4 files changed, 4 insertions, 16 deletions
diff --git a/include/anope.h b/include/anope.h
index 15944e165..30ca48e69 100644
--- a/include/anope.h
+++ b/include/anope.h
@@ -713,7 +713,7 @@ template<typename T> inline T convertTo(const Anope::string &s, bool failIfLefto
}
/** Casts to be used instead of dynamic_cast, this uses dynamic_cast
- * for debug builds and static_cast/reinterpret_cast on releass builds
+ * for debug builds and static_cast on releass builds
* to speed up the program because dynamic_cast relies on RTTI.
*/
#ifdef DEBUG_BUILD
@@ -731,18 +731,6 @@ template<typename T, typename O> inline T anope_dynamic_static_cast(O ptr)
#endif
}
-template<typename T, typename O> inline T anope_dynamic_reinterpret_cast(O ptr)
-{
-#ifdef DEBUG_BUILD
- T ret = dynamic_cast<T>(ptr);
- if (ptr != NULL && ret == NULL)
- throw CoreException(Anope::string("anope_dynamic_reinterpret_cast<") + typeid(T).name() + ">(" + typeid(O).name() + ") fail");
- return ret;
-#else
- return reinterpret_cast<T>(ptr);
-#endif
-}
-
/*************************************************************************/
/** Class with the ability to keep flags on items, they should extend from this
diff --git a/include/extensible.h b/include/extensible.h
index 493dc20cf..bd7c8c76d 100644
--- a/include/extensible.h
+++ b/include/extensible.h
@@ -107,7 +107,7 @@ class CoreExport Extensible
{
extensible_map::const_iterator it = this->extension_items.find(key);
if (it != this->extension_items.end())
- return anope_dynamic_reinterpret_cast<T>(it->second);
+ return anope_dynamic_static_cast<T>(it->second);
return NULL;
}
diff --git a/modules/extra/m_httpd.cpp b/modules/extra/m_httpd.cpp
index 1c42a0d11..616fc61a9 100644
--- a/modules/extra/m_httpd.cpp
+++ b/modules/extra/m_httpd.cpp
@@ -136,7 +136,7 @@ class MyHTTPClient : public HTTPClient
if (sz == Anope::string::npos || !sz || sz + 1 >= token.length())
continue;
this->header.post_data[token.substr(0, sz)] = HTTPUtils::URLDecode(token.substr(sz + 1));
- Log(LOG_DEBUG_2) << "HTTP POST from " << this->clientaddr.addr() << ": " << token.substr(0, sz) << ": " << this->header.post_data[token.substr(0, sz)];
+ Log(LOG_DEBUG_2) << "HTTP POST from " << this->clientaddr.addr() << ": " << token.substr(0, sz) << ": " << this->header.post_data[token.substr(0, sz)];
}
this->Serve();
diff --git a/modules/extra/webcpanel/webcpanel.h b/modules/extra/webcpanel/webcpanel.h
index 27b8ce67a..4ba6a7f65 100644
--- a/modules/extra/webcpanel/webcpanel.h
+++ b/modules/extra/webcpanel/webcpanel.h
@@ -50,7 +50,7 @@ class Panel : public Section, public Service
if (na == NULL)
return NULL;
- Anope::string *n_id = na->GetExt<Anope::string *>("webcpanel_id"), *n_ip = na->GetExt<Anope::string *>("webcpanel_ip");
+ Anope::string *n_id = na->GetExt<ExtensibleItemClass<Anope::string> *>("webcpanel_id"), *n_ip = na->GetExt<ExtensibleItemClass<Anope::string> *>("webcpanel_ip");
if (n_id == NULL || n_ip == NULL)
return NULL;
else if (id != *n_id)