Skip to content

Commit

Permalink
Deprecate env() with two parameters (#653)
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos Agüero <[email protected]>
  • Loading branch information
caguero authored Dec 2, 2024
1 parent 7cbbe44 commit 0c05864
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 0c05864

Please sign in to comment.