Properly handle move semantics in the scoped FTZ

This commit is contained in:
Robbert van der Helm
2021-04-28 12:43:46 +02:00
parent 93f089eca7
commit 160c6acb85
2 changed files with 19 additions and 2 deletions
+4 -1
View File
@@ -97,6 +97,9 @@ class ScopedFlushToZero {
ScopedFlushToZero(const ScopedFlushToZero&) = delete;
ScopedFlushToZero& operator=(const ScopedFlushToZero&) = delete;
ScopedFlushToZero(ScopedFlushToZero&&);
ScopedFlushToZero& operator=(ScopedFlushToZero&&);
private:
/**
* The previous FTZ mode. When we use this on the Wine side, this should
@@ -104,5 +107,5 @@ class ScopedFlushToZero {
* don't accidentally end up disabling FTZ somewhere where it should be
* enabled.
*/
unsigned int old_ftz_mode;
std::optional<unsigned int> old_ftz_mode;
};