mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 18:23:54 +02:00
use tbb::atomic for cp
This commit is contained in:
parent
ad7c01e86e
commit
5e9fb17949
2 changed files with 2 additions and 8 deletions
|
@ -430,8 +430,6 @@ void AudioMixerClientData::cleanupCodec() {
|
|||
}
|
||||
|
||||
AudioMixerClientData::IgnoreZone& AudioMixerClientData::IgnoreZoneMemo::get(unsigned int frame) {
|
||||
assert(_frame.is_lock_free());
|
||||
|
||||
// check for a memoized zone
|
||||
if (frame != _frame.load(std::memory_order_acquire)) {
|
||||
AvatarAudioStream* stream = _data.getAvatarAudioStream();
|
||||
|
@ -480,7 +478,6 @@ void AudioMixerClientData::IgnoreNodeCache::cache(bool shouldIgnore) {
|
|||
}
|
||||
|
||||
bool AudioMixerClientData::IgnoreNodeCache::isCached() {
|
||||
assert(_isCached.is_lock_free());
|
||||
return _isCached;
|
||||
}
|
||||
|
||||
|
|
|
@ -130,16 +130,13 @@ private:
|
|||
|
||||
class IgnoreNodeCache {
|
||||
public:
|
||||
// std::atomic is not copyable - always initialize uncached
|
||||
IgnoreNodeCache() {}
|
||||
IgnoreNodeCache(const IgnoreNodeCache& other) {}
|
||||
|
||||
void cache(bool shouldIgnore);
|
||||
bool isCached();
|
||||
bool shouldIgnore();
|
||||
|
||||
private:
|
||||
std::atomic<bool> _isCached { false };
|
||||
// tbb::atomic supports copy-ctor
|
||||
tbb::atomic<bool> _isCached { false };
|
||||
bool _shouldIgnore { false };
|
||||
};
|
||||
struct IgnoreNodeCacheHasher { std::size_t operator()(const QUuid& key) const { return qHash(key); } };
|
||||
|
|
Loading…
Reference in a new issue