Skip to content

live_effects/parameter/*array cleanup/optimisation

Daniel Boles requested to merge dboles/inkscape:djb_lpe_array_cleanup into master

Noticed in preparing for changes to Gtk::TreeIter et al., coming in GTK4

  • Qualify std::size_t.
  • Replace gchar with char, or where possible auto.
  • Avoid an unnecessary g_strdup().
  • Consistently use std::size_t, not unsigned, to iterate by index.
  • Remove redundant defaulted destructors.
  • Replace in-body assignment of pointers/booleans w/ in-member defaults.
  • Replace raw pointers and new/delete with std::unique_ptr.
  • Replace Gtk::manage(new T) with Gtk::make_managed().
  • Use auto for iterator types, slimming down some huge repetitive lines.
  • Iterate over _vector of shared_ptr by const&, avoiding copy/refct inc.
  • Iterate over scratch vectors of ustrings with && instead of copying...
  • Move deleted special members to public in case that means better error
  • Make members private that can be, not protected.
  • Add some missing #includes for gtkmm widgets.
  • Use auto_connection instead of manually disconnect()ing.
  • Avoid unnecessary shared_ptr copy/refct incr., in Satellite::unlink().
  • Deduplicate overloads of said method & vastly simplify implementation.
  • Remove some widget members that aren't used outside of one function.
  • Make others that we rebuild into unique_ptrs, to be clear re ownership
  • Move strings and shared_ptrs into destination containers, not copying.
  • Clean up un/needed #includes, forward-declarations, and namespaces.

Merge request reports