2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Fixed several bugs appearing on logout-login in player and messages.

This commit is contained in:
John Preston
2016-10-19 11:59:19 +03:00
parent 48a20f0e71
commit 40fc7379bc
9 changed files with 38 additions and 6 deletions

View File

@@ -30,10 +30,9 @@ inline constexpr size_t array_size(T(&)[N]) {
}
template <typename T>
inline T take(T &source) {
T result = T();
std_::swap_moveable(result, source);
return std_::move(result);
inline T take(T &source, T &&new_value = T()) {
std_::swap_moveable(new_value, source);
return std_::move(new_value);
}
} // namespace base