Commit Graph

6 Commits

Author SHA1 Message Date
John Preston ea7441ae77 Use single LEGAL file with license and copyright. 2018-01-03 13:23:14 +03:00
John Preston 2432845df2 Optimize and rename base::weak_unique_ptr.
Rename base::enable_weak_from_this -> base::has_weak_ptr.
Rename base::weak_unique_ptr -> base::weak_ptr.
Rename base::make_weak_unique -> base::make_weak.
Rename base/weak_unique_ptr.h -> base/weak_ptr.h
2017-11-30 21:33:27 +04:00
John Preston 8ff0120642 Add EditPeerInfoBox without saving. 2017-11-16 07:59:10 +04:00
John Preston f6ed3dff7f Rewrite base::lambda_guard, use only one pointer.
Support base::enable_weak_from_this for guarding, not only QObject,
in base::lambda_guard, in App::CallDelayed and in App::LambdaDelayed.

Allow only one guarding pointer, no places in code use more than one.
2017-11-16 07:59:08 +04:00
John Preston 101d4f6444 Use std::function for base::lambda implementation.
base::lambda becomes just std::function and base::lambda_once becomes
base::unique_function - a move-only wrapper around std::function.

This is required because Visual C++ 2017 15.4.1 has a compiler bug
with static member variables of class templates, they may collide.

The std::function uses inheritance and virtual functions instead of
custom vtables done by static members of class templates used in
custom base::lambda implementation, so they work fine.
2017-11-16 07:59:08 +04:00
John Preston c76389e126 Allow to use base::lambda independently. 2017-09-03 15:45:49 +03:00