Browse Source

GCC 4.5 compatibility: nullptr-related issues.

Vladimír Vondruš 13 years ago
parent
commit
fe91f02549
  1. 7
      src/Platform/AbstractXApplication.cpp
  2. 4
      src/Platform/AbstractXApplication.h
  3. 8
      src/Platform/GlutApplication.cpp
  4. 4
      src/Platform/GlutApplication.h
  5. 7
      src/Platform/GlxApplication.h
  6. 8
      src/Platform/NaClApplication.cpp
  7. 4
      src/Platform/NaClApplication.h
  8. 8
      src/Platform/Sdl2Application.cpp
  9. 4
      src/Platform/Sdl2Application.h
  10. 7
      src/Platform/WindowlessGlxApplication.cpp
  11. 4
      src/Platform/WindowlessGlxApplication.h
  12. 8
      src/Platform/WindowlessNaClApplication.cpp
  13. 4
      src/Platform/WindowlessNaClApplication.h
  14. 7
      src/Platform/XEglApplication.h

7
src/Platform/AbstractXApplication.cpp

@ -46,7 +46,12 @@ AbstractXApplication::AbstractXApplication(AbstractContextHandler<Display*, Visu
createContext({});
}
AbstractXApplication::AbstractXApplication(AbstractContextHandler<Display*, VisualID, Window>* contextHandler, const Arguments&, std::nullptr_t): contextHandler(contextHandler), c(nullptr), flags(Flag::Redraw) {}
#ifndef CORRADE_GCC45_COMPATIBILITY
AbstractXApplication::AbstractXApplication(AbstractContextHandler<Display*, VisualID, Window>* contextHandler, const Arguments&, std::nullptr_t)
#else
AbstractXApplication::AbstractXApplication(AbstractContextHandler<Display*, VisualID, Window>* contextHandler, const Arguments&, void*)
#endif
: contextHandler(contextHandler), c(nullptr), flags(Flag::Redraw) {}
void AbstractXApplication::createContext(const Configuration& configuration) {
CORRADE_ASSERT(!c, "AbstractXApplication::createContext(): context already created", );

4
src/Platform/AbstractXApplication.h

@ -94,7 +94,11 @@ class AbstractXApplication {
* Unlike above, the context is not created and must be created later
* with createContext() or tryCreateContext().
*/
#ifndef CORRADE_GCC45_COMPATIBILITY
explicit AbstractXApplication(AbstractContextHandler<Display*, VisualID, Window>* contextHandler, const Arguments& arguments, std::nullptr_t);
#else
explicit AbstractXApplication(AbstractContextHandler<Display*, VisualID, Window>* contextHandler, const Arguments& arguments, void*);
#endif
/**
* @brief Execute main loop

8
src/Platform/GlutApplication.cpp

@ -43,7 +43,13 @@ GlutApplication::GlutApplication(const Arguments& arguments): c(nullptr) {
createContext({});
}
GlutApplication::GlutApplication(const Arguments& arguments, std::nullptr_t): c(nullptr) {
#ifndef CORRADE_GCC45_COMPATIBILITY
GlutApplication::GlutApplication(const Arguments& arguments, std::nullptr_t)
#else
GlutApplication::GlutApplication(const Arguments& arguments, void*)
#endif
: c(nullptr)
{
initialize(arguments.argc, arguments.argv);
}

4
src/Platform/GlutApplication.h

@ -103,7 +103,11 @@ class GlutApplication {
* Unlike above, the context is not created and must be created later
* with createContext() or tryCreateContext().
*/
#ifndef CORRADE_GCC45_COMPATIBILITY
explicit GlutApplication(const Arguments& arguments, std::nullptr_t);
#else
explicit GlutApplication(const Arguments& arguments, void*);
#endif
/**
* @brief Execute main loop

7
src/Platform/GlxApplication.h

@ -60,7 +60,12 @@ class GlxApplication: public AbstractXApplication {
explicit GlxApplication(const Arguments& arguments, const Configuration& configuration = Configuration()): AbstractXApplication(new GlxContextHandler, arguments, configuration) {}
/** @copydoc GlutApplication::GlutApplication(const Arguments&, std::nullptr_t) */
explicit GlxApplication(const Arguments& arguments, std::nullptr_t): AbstractXApplication(new GlxContextHandler, arguments, nullptr) {}
#ifndef CORRADE_GCC45_COMPATIBILITY
explicit GlxApplication(const Arguments& arguments, std::nullptr_t)
#else
explicit GlxApplication(const Arguments& arguments, void*)
#endif
: AbstractXApplication(new GlxContextHandler, arguments, nullptr) {}
protected:
/* Nobody will need to have (and delete) GlxApplication*, thus this is

8
src/Platform/NaClApplication.cpp

@ -61,7 +61,13 @@ NaClApplication::NaClApplication(const Arguments& arguments): Instance(arguments
createContext({});
}
NaClApplication::NaClApplication(const Arguments& arguments, std::nullptr_t): Instance(arguments), Graphics3DClient(this), MouseLock(this), c(nullptr) {
#ifndef CORRADE_GCC45_COMPATIBILITY
NaClApplication::NaClApplication(const Arguments& arguments, std::nullptr_t)
#else
NaClApplication::NaClApplication(const Arguments& arguments, void*)
#endif
: Instance(arguments), Graphics3DClient(this), MouseLock(this), c(nullptr)
{
debugOutput = new ConsoleDebugOutput(this);
}

4
src/Platform/NaClApplication.h

@ -147,7 +147,11 @@ class NaClApplication: public pp::Instance, public pp::Graphics3DClient, public
#endif
/** @copydoc GlutApplication::GlutApplication(const Arguments&, std::nullptr_t) */
#ifndef CORRADE_GCC45_COMPATIBILITY
explicit NaClApplication(const Arguments& arguments, std::nullptr_t);
#else
explicit NaClApplication(const Arguments& arguments, void*);
#endif
/** @brief Whether the application runs fullscreen */
bool isFullscreen();

8
src/Platform/Sdl2Application.cpp

@ -59,7 +59,13 @@ Sdl2Application::Sdl2Application(const Arguments&): context(nullptr), flags(Flag
createContext({});
}
Sdl2Application::Sdl2Application(const Arguments&, std::nullptr_t): context(nullptr), flags(Flag::Redraw) {
#ifndef CORRADE_GCC45_COMPATIBILITY
Sdl2Application::Sdl2Application(const Arguments&, std::nullptr_t)
#else
Sdl2Application::Sdl2Application(const Arguments&, void*)
#endif
: context(nullptr), flags(Flag::Redraw)
{
initialize();
}

4
src/Platform/Sdl2Application.h

@ -90,7 +90,11 @@ class Sdl2Application {
#endif
/** @copydoc GlutApplication::GlutApplication(const Arguments&, std::nullptr_t) */
#ifndef CORRADE_GCC45_COMPATIBILITY
explicit Sdl2Application(const Arguments& arguments, std::nullptr_t);
#else
explicit Sdl2Application(const Arguments& arguments, void*);
#endif
/** @copydoc GlutApplication::exec() */
int exec();

7
src/Platform/WindowlessGlxApplication.cpp

@ -43,7 +43,12 @@ WindowlessGlxApplication::WindowlessGlxApplication(const Arguments&): c(nullptr)
createContext({});
}
WindowlessGlxApplication::WindowlessGlxApplication(const Arguments&, std::nullptr_t): c(nullptr) {}
#ifndef CORRADE_GCC45_COMPATIBILITY
WindowlessGlxApplication::WindowlessGlxApplication(const Arguments&, std::nullptr_t)
#else
WindowlessGlxApplication::WindowlessGlxApplication(const Arguments&, void*)
#endif
: c(nullptr) {}
void WindowlessGlxApplication::createContext(const Configuration&) {
CORRADE_ASSERT(!c, "WindowlessGlxApplication::createContext(): context already created", );

4
src/Platform/WindowlessGlxApplication.h

@ -83,7 +83,11 @@ class WindowlessGlxApplication {
#endif
/** @copydoc GlutApplication::GlutApplication(const Arguments&, std::nullptr_t) */
#ifndef CORRADE_GCC45_COMPATIBILITY
explicit WindowlessGlxApplication(const Arguments& arguments, std::nullptr_t);
#else
explicit WindowlessGlxApplication(const Arguments& arguments, void*);
#endif
/**
* @brief Execute application

8
src/Platform/WindowlessNaClApplication.cpp

@ -60,7 +60,13 @@ WindowlessNaClApplication::WindowlessNaClApplication(const Arguments& arguments)
createContext({});
}
WindowlessNaClApplication::WindowlessNaClApplication(const Arguments& arguments, std::nullptr_t): Instance(arguments), Graphics3DClient(this), graphics(nullptr), c(nullptr) {
#ifndef CORRADE_GCC45_COMPATIBILITY
WindowlessNaClApplication::WindowlessNaClApplication(const Arguments& arguments, std::nullptr_t)
#else
WindowlessNaClApplication::WindowlessNaClApplication(const Arguments& arguments, void*)
#endif
: Instance(arguments), Graphics3DClient(this), graphics(nullptr), c(nullptr)
{
debugOutput = new ConsoleDebugOutput(this);
}

4
src/Platform/WindowlessNaClApplication.h

@ -100,7 +100,11 @@ class WindowlessNaClApplication: public pp::Instance, public pp::Graphics3DClien
#endif
/** @copydoc GlutApplication::GlutApplication(const Arguments&, std::nullptr_t) */
#ifndef CORRADE_GCC45_COMPATIBILITY
explicit WindowlessNaClApplication(const Arguments& arguments, std::nullptr_t);
#else
explicit WindowlessNaClApplication(const Arguments& arguments, void*);
#endif
/**
* @brief Execute application

7
src/Platform/XEglApplication.h

@ -60,7 +60,12 @@ class XEglApplication: public AbstractXApplication {
explicit XEglApplication(const Arguments& arguments, const Configuration& configuration = Configuration()): AbstractXApplication(new EglContextHandler, arguments, configuration) {}
/** @copydoc GlutApplication::GlutApplication(const Arguments&, std::nullptr_t) */
explicit XEglApplication(const Arguments& arguments, std::nullptr_t): AbstractXApplication(new EglContextHandler, nullptr) {}
#ifndef CORRADE_GCC45_COMPATIBILITY
explicit XEglApplication(const Arguments& arguments, std::nullptr_t)
#else
explicit XEglApplication(const Arguments& arguments, void*)
#endif
: AbstractXApplication(new EglContextHandler, nullptr) {}
protected:
/* Nobody will need to have (and delete) XEglApplication*, thus this is

Loading…
Cancel
Save