Browse Source

Fixed compiler warnings for EglContext.

X11 macros are a mess with a lot of C-style casts, disabled the warnings
for this file. Also anonymized unused constructor parameters.
pull/279/head
Vladimír Vondruš 14 years ago
parent
commit
5bef02f46b
  1. 2
      src/Contexts/CMakeLists.txt
  2. 2
      src/Contexts/EglContext.cpp

2
src/Contexts/CMakeLists.txt

@ -31,6 +31,8 @@ if(WITH_EGLCONTEXT)
find_package(X11)
if(EGL_FOUND AND X11_FOUND)
add_library(MagnumEglContext STATIC EglContext.cpp)
# X11 macros are a mess, disable warnings for C-style casts
set_target_properties(MagnumEglContext PROPERTIES COMPILE_FLAGS "-Wno-old-style-cast")
install(FILES EglContext.h DESTINATION ${MAGNUM_INCLUDE_INSTALL_DIR}/Contexts)
install(TARGETS MagnumEglContext DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR})
else()

2
src/Contexts/EglContext.cpp

@ -21,7 +21,7 @@ using namespace std;
namespace Magnum { namespace Contexts {
EglContext::EglContext(int& argc, char** argv, const string& title, const Math::Vector2<GLsizei>& size): viewportSize(size) {
EglContext::EglContext(int&, char**, const string& title, const Math::Vector2<GLsizei>& size): viewportSize(size) {
/* Get default X display and root window, init EGL */
xDisplay = XOpenDisplay(0);
display = eglGetDisplay(xDisplay);

Loading…
Cancel
Save