From 373e8a10bf69fcdfa03b220db44f30e6d3513413 Mon Sep 17 00:00:00 2001 From: Martin Pecka Date: Thu, 21 Nov 2024 13:34:29 +0100 Subject: [PATCH] Changed ::getenv to gazebo::common::getEnv. Signed-off-by: Martin Pecka --- gazebo/gazebo_shared.cc | 3 ++- gazebo/gui/MainWindow.cc | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gazebo/gazebo_shared.cc b/gazebo/gazebo_shared.cc index cb898048a1..d7dfdfce86 100644 --- a/gazebo/gazebo_shared.cc +++ b/gazebo/gazebo_shared.cc @@ -30,7 +30,8 @@ void gazebo_shared::printVersion() { fprintf(stderr, "%s", GAZEBO_VERSION_HEADER); - char *ignoreEol = getenv("GAZEBO_SUPPRESS_EOL_WARNING"); + const char *ignoreEol = + gazebo::common::getEnv("GAZEBO_SUPPRESS_EOL_WARNING"); if (ignoreEol != nullptr && strncmp(ignoreEol, "1", 1) == 0) return; diff --git a/gazebo/gui/MainWindow.cc b/gazebo/gui/MainWindow.cc index 20b82aecee..57b155ea15 100644 --- a/gazebo/gui/MainWindow.cc +++ b/gazebo/gui/MainWindow.cc @@ -1678,7 +1678,7 @@ void MainWindow::ShowMenuBar(QMenuBar *_bar) this->dataPtr->menuLayout->addWidget(this->dataPtr->menuBar); if (!this->dataPtr->eolNotice) { - char *ignoreEol = getenv("GAZEBO_SUPPRESS_EOL_WARNING"); + const char *ignoreEol = common::getEnv("GAZEBO_SUPPRESS_EOL_WARNING"); if (ignoreEol == nullptr || strncmp(ignoreEol, "1", 1) != 0) { // Add Gazebo classic EOL notice label this->dataPtr->eolNotice = new QLabel(this->dataPtr->menuBar);