diff options
author | Hugo Lima <hugo.lima@openbossa.org> | 2009-09-28 10:59:28 -0300 |
---|---|---|
committer | Lauro Neto <lauro.neto@openbossa.org> | 2009-10-02 14:21:04 -0300 |
commit | 0d720fd9faa9eeef9756952d4e9df4ef8f93029a (patch) | |
tree | a37de0f9615c0d964ccd2d4bd0f05f5bd5c3b208 /main.cpp | |
parent | 42562fa1c3794ba9657cdfd29cbee33000316d52 (diff) |
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.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 { |