Contexts' getRuntime method uses static_cast instead of reinterpret_cast.

This required a few changes in include order and forward declarations to fix the real reason why reinterpret_cast was mistakenly used.

refs #81
This commit is contained in:
Mathew Sutcliffe
2014-01-08 00:04:22 +00:00
parent 1c1fdabd2e
commit 0bad7bb2e8
8 changed files with 76 additions and 29 deletions

View File

@@ -12,6 +12,7 @@
#include "blackmisc/avallclasses.h"
#include "blackmisc/statusmessage.h"
#include "blackmisc/statusmessagelist.h"
#include "blackcore/coreruntime.h"
class QNetworkAccessManager;
class QNetworkReply;
@@ -20,8 +21,6 @@ class QNetworkReply;
namespace BlackCore
{
class CCoreRuntime;
/*!
* \brief Network context
*/
@@ -60,7 +59,7 @@ namespace BlackCore
*/
const CCoreRuntime *getRuntime() const
{
return reinterpret_cast<CCoreRuntime *>(this->parent());
return static_cast<CCoreRuntime *>(this->parent());
}
/*!