I realize why the original was spelled wrong, volatile is a c++ keyword. Modify to not require learning a misspelling, and note why it can't have that name (#725)

Signed-off-by: Emerson Knapp <eknapp@amazon.com>
This commit is contained in:
Emerson Knapp 2019-05-17 18:18:58 -07:00 committed by Dirk Thomas
parent 05c19028f4
commit 005131dba8
2 changed files with 5 additions and 2 deletions

View file

@ -105,8 +105,11 @@ public:
durability(rmw_qos_durability_policy_t durability);
/// Set the durability setting to volatile.
/**
* Note that this cannot be named `volatile` because it is a C++ keyword.
*/
QoS &
volatile();
durability_volatile();
/// Set the durability setting to transient local.
QoS &

View file

@ -120,7 +120,7 @@ QoS::durability(rmw_qos_durability_policy_t durability)
}
QoS &
QoS::volatile()
QoS::durability_volatile()
{
return this->durability(RMW_QOS_POLICY_DURABILITY_VOLATILE);
}