Cantera / enhancements

Repository for proposed and ongoing enhancements to Cantera
11 stars 5 forks source link

Remove unnecessary typedef's #181

Closed ischoegl closed 11 months ago

ischoegl commented 11 months ago

Abstract

A major version step from 2.6 to 3.0 could be used to remove some legacy typedef's where using standard types would clarify what those types are (after introducing using std::vector;, savings of length are mostly marginal)

There are two different 'compositions', which are identical (one typedef is worth keeping in this instance):

It would also be possible to eliminate std:: in many instances (due to newly introduced using std::xyz:

Motivation

Improve readability of code (and Doxygen documentation):

Possible Solutions

Simple find/replace in *.h/*.cpp files.

speth commented 11 months ago

I'd say that making these changes has very little to do with the 3.0 version change, assuming we leave the old typedefs available but marked as deprecated. However, this might be as good an opportunity as we're going to get in terms of having relatively few major PRs open (or large pre-PR projects that I'm aware of) that will require significant manual conflict resolution to rebase them.

One somewhat related change that had been on my mind, in that it would touch a lot of the same lines of code, is making full use of the C++11 override specifier, and removing the virtual keyword from overrides (i.e., virtual should only appear on the base class declaration of a method). Currently, we only do this for a handful of classes that are either recent additions or have had major recent changes.

ischoegl commented 11 months ago

Ok. From my perspective, these are changes that are easily implemented but somewhat of a pain to review, which is the reason I was asking. I'm :+1: with moving forward, although I'd like to resolve the virtual in a different enhancement/PR (which I'd be happy to review). If you're ok as well, I'll wait until the current slew of PR's is merged, and start ticking the items off thereafter.