summaryrefslogtreecommitdiffstats
path: root/main.cpp
diff options
context:
space:
mode:
authorHugo Lima <hugo.lima@openbossa.org>2009-09-28 10:59:28 -0300
committerLauro Neto <lauro.neto@openbossa.org>2009-10-02 14:21:04 -0300
commit0d720fd9faa9eeef9756952d4e9df4ef8f93029a (patch)
treea37de0f9615c0d964ccd2d4bd0f05f5bd5c3b208 /main.cpp
parent42562fa1c3794ba9657cdfd29cbee33000316d52 (diff)
downloadgeneratorrunner-0d720fd9faa9eeef9756952d4e9df4ef8f93029a.tar.gz
generatorrunner-0d720fd9faa9eeef9756952d4e9df4ef8f93029a.tar.xz
generatorrunner-0d720fd9faa9eeef9756952d4e9df4ef8f93029a.zip
reinterpert_cast replaced by a C-style cast, to avoid compiler errors on some plataforms.
Cast an object pointer to a function pointer is an undefinied behaviour in some exotic platforms, so some compiler raise a flag against it. However if we use a C-style cast the compiler ignores it. This problem is related to the QLibrary API returning a void* instead of a generic function pointer.
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.cpp b/main.cpp
index d4858ce..a8cb86d 100644
--- a/main.cpp
+++ b/main.cpp
@@ -127,7 +127,7 @@ int main(int argc, char *argv[])
generatorFile = QString(GENERATORRUNNER_PLUGIN_DIR) + "/lib" + generatorSet + "_generator";
QLibrary plugin(generatorFile);
- getGeneratorsFunc getGenerators = reinterpret_cast<getGeneratorsFunc>(plugin.resolve("getGenerators"));
+ getGeneratorsFunc getGenerators = (getGeneratorsFunc)plugin.resolve("getGenerators");
if (getGenerators)
generators = getGenerators();
else {