From 0b966f1180fe07573a09879612da65fd7c0f74f3 Mon Sep 17 00:00:00 2001 From: Sapir Shemer Date: Sun, 8 Mar 2020 14:33:28 +0200 Subject: [PATCH] Shanged signed to unsigned --- glshift/GLManager.cpp | 6 +++--- glshift/GLManager.h | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/glshift/GLManager.cpp b/glshift/GLManager.cpp index 3807e07..5b953a0 100644 --- a/glshift/GLManager.cpp +++ b/glshift/GLManager.cpp @@ -13,7 +13,7 @@ GLShift::GLManager::GLManager() { } } -GLShift::GLManager::GLManager(int major, int minor) { +GLShift::GLManager::GLManager(unsigned int major, unsigned int minor) { if(!glfwInit()) { std::cerr << "Couldn't initialize glfw context" << std::endl; delete this; @@ -21,13 +21,13 @@ GLShift::GLManager::GLManager(int major, int minor) { this->setVersion(major, minor); } -void GLShift::GLManager::setVersion(int major, int minor) { +void GLShift::GLManager::setVersion(unsigned int major, unsigned int minor) { this->major = major; this->minor = minor; glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, major); glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, minor); } -void GLShift::GLManager::openWindow(int width, int height, const char* title,bool isFullScreen) { +void GLShift::GLManager::openWindow(unsigned int width, unsigned int height, const char* title,bool isFullScreen) { this->window = glfwCreateWindow(width, height, title, isFullScreen ? glfwGetPrimaryMonitor() : NULL, NULL); glfwMakeContextCurrent(this->window); if(GLenum err = glewInit(); err != GLEW_OK) { diff --git a/glshift/GLManager.h b/glshift/GLManager.h index a1800ab..1c69be2 100644 --- a/glshift/GLManager.h +++ b/glshift/GLManager.h @@ -19,7 +19,7 @@ class GLShift::GLManager { * @param major * @param minor */ - GLManager(signed int major, signed int minor); + GLManager(unsigned int major, unsigned int minor); /** * Terminated the GLFW environment */ @@ -30,7 +30,7 @@ class GLShift::GLManager { * @param major * @param minor */ - void setVersion(signed int major, signed int minor); + void setVersion(unsigned int major, unsigned int minor); /** * Sets the renderer object to use for rendering on the window * @param renderer @@ -43,12 +43,12 @@ class GLShift::GLManager { * @param title * @param isFullScreen Set true to make full screen app */ - void openWindow(signed int width, signed int height, const char* title, bool isFullScreen = false); + void openWindow(unsigned int width, unsigned int height, const char* title, bool isFullScreen = false); void run(); private: GLFWwindow *window; GLRenderer *renderer; - signed int major, minor; + unsigned int major, minor; };