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=(Window &&other) noexcept;
|
||||
Window &operator=(Window other) noexcept;
|
||||
};
|
||||
|
||||
void color_10_bits() noexcept;
|
||||
|
|
|
|||
|
|
@ -89,9 +89,9 @@ namespace gui {
|
|||
glfwMakeContextCurrent(wwindow.get());
|
||||
}
|
||||
|
||||
Window &Window::operator=(Window &&other) noexcept {
|
||||
wwindow = std::move(other.wwindow);
|
||||
modules = std::move(other.modules);
|
||||
Window &Window::operator=(Window other) noexcept {
|
||||
std::swap(wwindow, other.wwindow);
|
||||
std::swap(modules, other.modules);
|
||||
glfwSetWindowUserPointer(wwindow.get(), &modules);
|
||||
return *this;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue