summaryrefslogtreecommitdiffhomepage
path: root/gui/init.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2019-01-24 20:04:14 +0100
committerStanislaw Halik <sthalik@misaki.pl>2019-01-24 20:04:14 +0100
commit79aa5c60b38da8403ec2550247143c8f4b45d323 (patch)
treea8e1d29657ebc48509afaef8c979c43437a81c0d /gui/init.cpp
parent21ce1398513a085d44ef89a9250541769ad11e46 (diff)
gui, opentrack: simplify std::function/unique_ptr usage
Reported by: ElDesalmado
Diffstat (limited to 'gui/init.cpp')
-rw-r--r--gui/init.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/gui/init.cpp b/gui/init.cpp
index 07f6c6b1..77d90212 100644
--- a/gui/init.cpp
+++ b/gui/init.cpp
@@ -238,7 +238,7 @@ static int run_window(std::unique_ptr<QWidget> main_window)
return status;
}
-int otr_main(int argc, char** argv, std::function<QWidget*()> const& make_main_window)
+int otr_main(int argc, char** argv, std::function<std::unique_ptr<QWidget>()> const& make_main_window)
{
set_fp_mask();
#ifdef OTR_X11_THREADS
@@ -286,7 +286,7 @@ int otr_main(int argc, char** argv, std::function<QWidget*()> const& make_main_w
}
}
- int ret = run_window(std::unique_ptr<QWidget>(make_main_window()));
+ int ret = run_window(make_main_window());
#if 0
// msvc crashes in Qt plugin system's dtor