HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
src
ttauri
utils.hpp
1
// Copyright Take Vos 2020.
2
// Distributed under the Boost Software License, Version 1.0.
3
// (See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
4
5
#pragma once
6
7
namespace
tt {
8
12
template
<
typename
T,
typename
U>
13
[[nodiscard]]
bool
compare_then_assign(T &lhs, U &&rhs)
noexcept
14
{
15
if
(lhs != rhs) {
16
lhs = std::forward<U>(rhs);
17
return
true
;
18
}
else
{
19
return
false
;
20
}
21
}
22
23
}
Generated on Mon Apr 22 2024 12:53:35 for HikoGUI by
1.10.0