Skip to content

Commit

Permalink
Deprecate env() with two parameters
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos Agüero <caguero@openrobotics.org>
  • Loading branch information
caguero committed Dec 2, 2024
1 parent 7cbbe44 commit a669510
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
12 changes: 1 addition & 11 deletions include/gz/common/Util.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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'.
///
Expand Down
6 changes: 0 additions & 6 deletions src/Util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit a669510

Please sign in to comment.