mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-16 18:56:52 +02:00
improved SOO swap, fixed Darwin-clang build config
This commit is contained in:
@@ -668,9 +668,17 @@ inline void Var::swap(Var& other)
|
||||
else
|
||||
{
|
||||
Var tmp(*this);
|
||||
if (_placeholder.isLocal()) destruct();
|
||||
construct(other);
|
||||
other = tmp;
|
||||
try
|
||||
{
|
||||
if (_placeholder.isLocal()) destruct();
|
||||
construct(other);
|
||||
other = tmp;
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
construct(tmp);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user