diff --git a/simulate/simulate.cc b/simulate/simulate.cc index 808a1718..2f54878b 100644 --- a/simulate/simulate.cc +++ b/simulate/simulate.cc @@ -84,7 +84,7 @@ const mjuiDef defFile[] = { {mjITEM_BUTTON, "Print model", 2, nullptr, "CM"}, {mjITEM_BUTTON, "Print data", 2, nullptr, "CD"}, {mjITEM_BUTTON, "Quit", 1, nullptr, "CQ"}, - {mjITEM_BUTTON, "Screenshot", 2, NULL, "CP"}, + {mjITEM_BUTTON, "Screenshot", 2, nullptr, "CP"}, {mjITEM_END} }; @@ -1088,7 +1088,7 @@ void uiEvent(mjuiState* state) { { const std::string path = getSavePath("mjmodel.mjb"); if (!path.empty()) { - mj_saveModel(m, path.c_str(), NULL, 0); + mj_saveModel(m, path.c_str(), nullptr, 0); } } break; @@ -1836,7 +1836,7 @@ void Simulate::render() { if (!rgb) { mju_error("could not allocate buffer for screenshot"); } - mjr_readPixels(rgb.get(), NULL, uistate.rect[0], &con); + mjr_readPixels(rgb.get(), nullptr, uistate.rect[0], &con); // flip up-down for (int r = 0; r < h/2; ++r) { diff --git a/simulate/uitools.cc b/simulate/uitools.cc index ef7bfa99..362fd544 100644 --- a/simulate/uitools.cc +++ b/simulate/uitools.cc @@ -314,17 +314,17 @@ void uiClearCallback(GLFWwindow* wnd) { // clear container if (Glfw().glfwGetWindowUserPointer(wnd)) { mju_free(Glfw().glfwGetWindowUserPointer(wnd)); - Glfw().glfwSetWindowUserPointer(wnd, NULL); + Glfw().glfwSetWindowUserPointer(wnd, nullptr); } // clear internal callbacks - Glfw().glfwSetKeyCallback(wnd, NULL); - Glfw().glfwSetCursorPosCallback(wnd, NULL); - Glfw().glfwSetMouseButtonCallback(wnd, NULL); - Glfw().glfwSetScrollCallback(wnd, NULL); - Glfw().glfwSetWindowSizeCallback(wnd, NULL); - Glfw().glfwSetWindowRefreshCallback(wnd, NULL); - Glfw().glfwSetDropCallback(wnd, NULL); + Glfw().glfwSetKeyCallback(wnd, nullptr); + Glfw().glfwSetCursorPosCallback(wnd, nullptr); + Glfw().glfwSetMouseButtonCallback(wnd, nullptr); + Glfw().glfwSetScrollCallback(wnd, nullptr); + Glfw().glfwSetWindowSizeCallback(wnd, nullptr); + Glfw().glfwSetWindowRefreshCallback(wnd, nullptr); + Glfw().glfwSetDropCallback(wnd, nullptr); }