Skip to content

Replace C pointers and collections with C++ equivalents

Ghost User requested to merge (removed):master into master

Please note that the code hasn't been thoroughly examined/tested for memory leaks yet.

Changes:

  • gboolean -> bool
  • gchar* -> std::string
  • gpointer chip -> Ptr<t_chip>
  • gpointer chip_feature -> Ptr<t_chipfeature>
  • GPtrArray -> std::vector
  • t_chip* -> Ptr<t_chip>
  • Remove @param comments describing just the parameter's data type
  • GtkWidget *tachos[MAX_NUM_CHIPS][MAX_NUM_FEATURES] -> std::map
  • Remove hard-coded limit on the maximum number of tachos
  • Remove redundant field t_chip::num_features
  • free_chip() -> t_chip::~t_chip()
  • free_chipfeature() -> default auto-generated destructor
  • new t_chip() -> xfce4::make<t_chip>()
  • new t_chipfeature() -> xfce4::make<t_chipfeature>()
  • for(;;) -> for(:)

Bug fixes:

  • strncmp(disk, "/dev/fd", 6) -> xfce4::starts_with(disk, "/dev/fd")
Edited by Ghost User

Merge request reports