mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 06:19:02 +02:00
store discoverability mode as an int
This commit is contained in:
parent
5feb6be221
commit
f8fe8393dd
2 changed files with 5 additions and 5 deletions
|
@ -75,12 +75,12 @@ void DiscoverabilityManager::removeLocation() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void DiscoverabilityManager::setDiscoverabilityMode(Discoverability::Mode discoverabilityMode) {
|
void DiscoverabilityManager::setDiscoverabilityMode(Discoverability::Mode discoverabilityMode) {
|
||||||
if (_mode.get() != discoverabilityMode) {
|
if (static_cast<Discoverability::Mode>(_mode.get()) != discoverabilityMode) {
|
||||||
|
|
||||||
// update the setting to the new value
|
// update the setting to the new value
|
||||||
_mode.set(discoverabilityMode);
|
_mode.set(static_cast<int>(discoverabilityMode));
|
||||||
|
|
||||||
if (_mode.get() == Discoverability::None) {
|
if (static_cast<int>(_mode.get()) == Discoverability::None) {
|
||||||
// if we just got set to no discoverability, make sure that we delete our location in DB
|
// if we just got set to no discoverability, make sure that we delete our location in DB
|
||||||
removeLocation();
|
removeLocation();
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,13 +33,13 @@ public slots:
|
||||||
void updateLocation();
|
void updateLocation();
|
||||||
void removeLocation();
|
void removeLocation();
|
||||||
|
|
||||||
Discoverability::Mode getDiscoverabilityMode() { return _mode.get(); }
|
Discoverability::Mode getDiscoverabilityMode() { return static_cast<Discoverability::Mode>(_mode.get()); }
|
||||||
void setDiscoverabilityMode(Discoverability::Mode discoverabilityMode);
|
void setDiscoverabilityMode(Discoverability::Mode discoverabilityMode);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DiscoverabilityManager();
|
DiscoverabilityManager();
|
||||||
|
|
||||||
Setting::Handle<Discoverability::Mode> _mode;
|
Setting::Handle<int> _mode;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // hifi_DiscoverabilityManager_h
|
#endif // hifi_DiscoverabilityManager_h
|
Loading…
Reference in a new issue