From ac9afb26dd7ea27b40bbcd2bd44fcdf1ae3932ae Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Thu, 4 Jan 2024 17:38:14 +0200 Subject: [PATCH] aesthetic optimization for xscale, yscale and zscale --- src/fix_indent.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/fix_indent.cpp b/src/fix_indent.cpp index d3e80ecd79..28dcac08d0 100644 --- a/src/fix_indent.cpp +++ b/src/fix_indent.cpp @@ -82,13 +82,9 @@ FixIndent::FixIndent(LAMMPS *lmp, int narg, char **arg) : // setup scaling - double xscale,yscale,zscale; - if (scaleflag) { - xscale = domain->lattice->xlattice; - yscale = domain->lattice->ylattice; - zscale = domain->lattice->zlattice; - } - else xscale = yscale = zscale = 1.0; + const double xscale { scaleflag ? domain->lattice->xlattice : 1.0}; + const double yscale { scaleflag ? domain->lattice->ylattice : 1.0}; + const double zscale { scaleflag ? domain->lattice->zlattice : 1.0}; // apply scaling factors to geometry