Closed dfaure-kdab closed 3 years ago
Urgh, nasty regression in clang-format 10.0 which outputs { }
instead of {}
for empty bodies. All I can find about it is https://reviews.llvm.org/D37979
I'll fix it by hand... (well, with a perl one-liner) :)
@martonmiklos this is ready for review now
This partially reverts the previous commit in XmlElement to choose a more optimal solution. The copy constructor is as before (instead of calling a too-generic std::swap that will create more temporaries). The move constructor was allocating needlessly, we just need to grab the pointer of the other instance. So instead this now uses unique_ptr to simplify the destructor and because it gives us the move operations automatically.
Independently from move operations, this code review also spotted a number of missing calls to base classes in the existing operator=. Proved by unittests, and fixed.