Base: C++ core guidelines: init variables

This commit is contained in:
wmayer
2023-08-24 14:21:05 +02:00
committed by wwmayer
parent 53a4fb14c3
commit 010dca8303
43 changed files with 622 additions and 626 deletions

View File

@@ -218,18 +218,18 @@ QString UnitsSchemaImperialBuilding::schemaTranslate(const Quantity &quant, doub
double totalInches = std::abs(quant.getValue())/factor;
// minimum denominator (8 for 1/8, 16 for 1/16, etc)
int minden;
int minden{};
// Outputs
int feet; // whole feet
int inches; // whole inches
int num,den; // numerator and denominator of fractional val
int feet{}; // whole feet
int inches{}; // whole inches
int num{},den{}; // numerator and denominator of fractional val
std::stringstream output; // output stream
// Intermediate values
int ntot; // total fractional units
int a,b,d; // used to compute greatest common denominator
int tmp; // temporary variable for GCD
int ntot{}; // total fractional units
int a{},b{},d{}; // used to compute greatest common denominator
int tmp{}; // temporary variable for GCD
// Get the current user specified minimum denominator
minden = quant.getFormat().getDenominator();