-
Daniel Boles authored
* Use auto_connection instead of having to manually call .disconnect() * Don't emit signals and THEN check they're empty: add if/else branch. * Move, not copy, slots into our lists. * Leverage emplace*() returning reference to slim down connect*First() * Use an unordered_map of SPObject* since generally they perform best. * Exit early instead of indenting. Use auto to declare iterators. * Replace use of stringstream with ustring::compose(). Move away strings * Call emptyBack() instead of duplicating its body. * Be more const, but avoid unnecessary const_cast & copy of our items(). * Replace overly complex iterator-based loop with a range-based `for`. * Don't copy tool->_selected_nodes->_points_list, since we only read it. * Where we 'did' need to copy it, we can just copy the first element, as that's all we use, & in doing that we should be safe if list is empty. * Clear one local vector earlier than return, to save a tiny bit of RAM! * Add const-correct getters to node.h etc, to support const in selection * Use constexpr in place of consts or, worse, #defines, in a few places. * Replace another iterator-based loop with range-for to shush clangtidy. * Only call document->getDefs() once, not per iteration of a `for` loop.