Resolve bug segfault
This commit is contained in:
parent
4d517cea85
commit
c5eb129109
2 changed files with 4 additions and 4 deletions
|
|
@ -71,7 +71,7 @@ namespace gui {
|
||||||
|
|
||||||
Window &operator=(const Window &) = delete;
|
Window &operator=(const Window &) = delete;
|
||||||
|
|
||||||
Window &operator=(Window &&other) noexcept;
|
Window &operator=(Window other) noexcept;
|
||||||
};
|
};
|
||||||
|
|
||||||
void color_10_bits() noexcept;
|
void color_10_bits() noexcept;
|
||||||
|
|
|
||||||
|
|
@ -89,9 +89,9 @@ namespace gui {
|
||||||
glfwMakeContextCurrent(wwindow.get());
|
glfwMakeContextCurrent(wwindow.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
Window &Window::operator=(Window &&other) noexcept {
|
Window &Window::operator=(Window other) noexcept {
|
||||||
wwindow = std::move(other.wwindow);
|
std::swap(wwindow, other.wwindow);
|
||||||
modules = std::move(other.modules);
|
std::swap(modules, other.modules);
|
||||||
glfwSetWindowUserPointer(wwindow.get(), &modules);
|
glfwSetWindowUserPointer(wwindow.get(), &modules);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue