mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-19 06:43:58 -07:00
45 lines
1.6 KiB
Diff
45 lines
1.6 KiB
Diff
|
|
# HG changeset patch
|
|
# User Mike Hommey <mh+mozilla@glandium.org>
|
|
# Date 1714550740 0
|
|
# Node ID 223087fdc29f18678f6174e9807b8780e439acf6
|
|
# Parent dbf00dfdc037f79df923fbb6681de64bc74c5a8e
|
|
Bug 1894423 - Remove unused ExclusiveData move constructor. r=spidermonkey-reviewers,jonco
|
|
|
|
Because the constructor is actually not used, the compiler used to not
|
|
complain about it being broken. Recent changes on clang trunk made it
|
|
catch this problem without the constructor being used.
|
|
|
|
As Mutex doesn't have a move constructor, it's also not only a matter of
|
|
adding the missing underscore to lock.
|
|
|
|
As the constructor is never used, just remove it.
|
|
|
|
Differential Revision: https://phabricator.services.mozilla.com/D209108
|
|
|
|
diff --git a/js/src/threading/ExclusiveData.h b/js/src/threading/ExclusiveData.h
|
|
--- a/js/src/threading/ExclusiveData.h
|
|
+++ b/js/src/threading/ExclusiveData.h
|
|
@@ -104,21 +104,16 @@ class ExclusiveData {
|
|
|
|
/**
|
|
* Create a new `ExclusiveData`, constructing the protected value in place.
|
|
*/
|
|
template <typename... Args>
|
|
explicit ExclusiveData(const MutexId& id, Args&&... args)
|
|
: lock_(id), value_(std::forward<Args>(args)...) {}
|
|
|
|
- ExclusiveData(ExclusiveData&& rhs)
|
|
- : lock_(std::move(rhs.lock)), value_(std::move(rhs.value_)) {
|
|
- MOZ_ASSERT(&rhs != this, "self-move disallowed!");
|
|
- }
|
|
-
|
|
ExclusiveData& operator=(ExclusiveData&& rhs) {
|
|
this->~ExclusiveData();
|
|
new (mozilla::KnownNotNull, this) ExclusiveData(std::move(rhs));
|
|
return *this;
|
|
}
|
|
|
|
/**
|
|
* An RAII class that provides exclusive access to a `ExclusiveData<T>`'s
|
|
|