Replace NULL with nullptr.

PiperOrigin-RevId: 491385488
Change-Id: Iec34af99edb7ccd64834130a8cc6280a02b166c2
This commit is contained in:
Saran Tunyasuvunakool
2022-11-28 10:43:52 -08:00
committed by Copybara-Service
parent b14d9bf75b
commit ecac5758e2
2 changed files with 11 additions and 11 deletions
+3 -3
View File
@@ -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) {
+8 -8
View File
@@ -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);
}