From a669510b44009b34ea77b4e0bd0916c9e1f509cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Ag=C3=BCero?= Date: Mon, 2 Dec 2024 18:24:16 +0100 Subject: [PATCH] Deprecate env() with two parameters MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Carlos Agüero --- include/gz/common/Util.hh | 12 +----------- src/Util.cc | 6 ------ 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/include/gz/common/Util.hh b/include/gz/common/Util.hh index 5dbc88ae8..431c45655 100644 --- a/include/gz/common/Util.hh +++ b/include/gz/common/Util.hh @@ -208,16 +208,6 @@ namespace gz return hash; } - /// \brief Find the environment variable '_name' and return its value. - /// - /// \TODO(mjcarroll): Deprecate and remove in tick-tock. - /// - /// \param[in] _name Name of the environment variable. - /// \param[out] _value Value if the variable was found. - /// \return True if the variable was found or false otherwise. - bool GZ_COMMON_VISIBLE env( - const std::string &_name, std::string &_value); - /// \brief Find the environment variable '_name' and return its value. /// \param[in] _name Name of the environment variable. /// \param[out] _value Value if the variable was found. @@ -226,7 +216,7 @@ namespace gz /// \return True if the variable was found or false otherwise. bool GZ_COMMON_VISIBLE env( const std::string &_name, std::string &_value, - bool _allowEmpty); + bool _allowEmpty = false); /// \brief Set the environment variable '_name'. /// diff --git a/src/Util.cc b/src/Util.cc index b8659cef9..fa30b014f 100644 --- a/src/Util.cc +++ b/src/Util.cc @@ -349,12 +349,6 @@ common::SystemPaths *common::systemPaths() return &GetSystemPaths(); } -///////////////////////////////////////////////// -bool common::env(const std::string &_name, std::string &_value) -{ - return env(_name, _value, false); -} - ///////////////////////////////////////////////// bool common::env(const std::string &_name, std::string &_value,