From 92f605df326ac4b1f4dd65928d6350b97eea6096 Mon Sep 17 00:00:00 2001 From: Bruno de Oliveira Abinader Date: Sun, 12 Jun 2016 13:01:45 +0300 Subject: [tidy] Check modernize-use-nullptr Ref: http://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html --- platform/darwin/src/headless_view_cgl.cpp | 2 +- platform/default/glfw_view.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'platform') diff --git a/platform/darwin/src/headless_view_cgl.cpp b/platform/darwin/src/headless_view_cgl.cpp index a4f809a250..dc58463b5d 100644 --- a/platform/darwin/src/headless_view_cgl.cpp +++ b/platform/darwin/src/headless_view_cgl.cpp @@ -19,7 +19,7 @@ gl::glProc HeadlessView::initializeExtension(const char* name) { } void HeadlessView::createContext() { - CGLError error = CGLCreateContext(display->pixelFormat, NULL, &glContext); + CGLError error = CGLCreateContext(display->pixelFormat, nullptr, &glContext); if (error != kCGLNoError) { throw std::runtime_error(std::string("Error creating GL context object:") + CGLErrorString(error) + "\n"); } diff --git a/platform/default/glfw_view.cpp b/platform/default/glfw_view.cpp index 67e9748a70..7bf40496f6 100644 --- a/platform/default/glfw_view.cpp +++ b/platform/default/glfw_view.cpp @@ -23,7 +23,7 @@ GLFWView::GLFWView(bool fullscreen_, bool benchmark_) : fullscreen(fullscreen_), benchmark(benchmark_) { glfwSetErrorCallback(glfwError); - std::srand(std::time(0)); + std::srand(std::time(nullptr)); if (!glfwInit()) { mbgl::Log::Error(mbgl::Event::OpenGL, "failed to initialize glfw"); @@ -55,7 +55,7 @@ GLFWView::GLFWView(bool fullscreen_, bool benchmark_) glfwWindowHint(GLFW_STENCIL_BITS, 8); glfwWindowHint(GLFW_DEPTH_BITS, 16); - window = glfwCreateWindow(width, height, "Mapbox GL", monitor, NULL); + window = glfwCreateWindow(width, height, "Mapbox GL", monitor, nullptr); if (!window) { glfwTerminate(); mbgl::Log::Error(mbgl::Event::OpenGL, "failed to initialize window"); -- cgit v1.2.1