diff options
Diffstat (limited to 'platform/glfw/glfw_view.cpp')
-rw-r--r-- | platform/glfw/glfw_view.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/platform/glfw/glfw_view.cpp b/platform/glfw/glfw_view.cpp index f4ade26885..26c946ed76 100644 --- a/platform/glfw/glfw_view.cpp +++ b/platform/glfw/glfw_view.cpp @@ -22,7 +22,7 @@ GLFWView::GLFWView(bool fullscreen_, bool benchmark_) : fullscreen(fullscreen_), benchmark(benchmark_) { glfwSetErrorCallback(glfwError); - std::srand(std::time(nullptr)); + std::srand(static_cast<unsigned int>(std::time(nullptr))); if (!glfwInit()) { mbgl::Log::Error(mbgl::Event::OpenGL, "failed to initialize glfw"); @@ -542,7 +542,7 @@ void showDebugImage(std::string name, const char *data, size_t width, size_t hei static GLFWwindow *debugWindow = nullptr; if (!debugWindow) { - debugWindow = glfwCreateWindow(width, height, name.c_str(), nullptr, nullptr); + debugWindow = glfwCreateWindow(static_cast<int>(width), static_cast<int>(height), name.c_str(), nullptr, nullptr); if (!debugWindow) { glfwTerminate(); fprintf(stderr, "Failed to initialize window\n"); @@ -552,7 +552,7 @@ void showDebugImage(std::string name, const char *data, size_t width, size_t hei GLFWwindow *currentWindow = glfwGetCurrentContext(); - glfwSetWindowSize(debugWindow, width, height); + glfwSetWindowSize(debugWindow, static_cast<int>(width), static_cast<int>(height)); glfwMakeContextCurrent(debugWindow); int fbWidth, fbHeight; @@ -573,7 +573,7 @@ void showColorDebugImage(std::string name, const char *data, size_t logicalWidth static GLFWwindow *debugWindow = nullptr; if (!debugWindow) { - debugWindow = glfwCreateWindow(logicalWidth, logicalHeight, name.c_str(), nullptr, nullptr); + debugWindow = glfwCreateWindow(static_cast<int>(logicalWidth), static_cast<int>(logicalHeight), name.c_str(), nullptr, nullptr); if (!debugWindow) { glfwTerminate(); fprintf(stderr, "Failed to initialize window\n"); @@ -583,7 +583,7 @@ void showColorDebugImage(std::string name, const char *data, size_t logicalWidth GLFWwindow *currentWindow = glfwGetCurrentContext(); - glfwSetWindowSize(debugWindow, logicalWidth, logicalHeight); + glfwSetWindowSize(debugWindow, static_cast<int>(logicalWidth), static_cast<int>(logicalHeight)); glfwMakeContextCurrent(debugWindow); int fbWidth, fbHeight; |