Restored constexpr initialization and return-by-value of CMeasurementUnit constants

that were removed by commit 787b54108e.

For rationale, see the commits fef2bc528e, c8d78ada65, 07ec7e6bc1 where these
were originally introduced.
This commit is contained in:
Mat Sutcliffe
2019-02-24 12:34:15 +00:00
parent 30c0054f57
commit 980e1d7b80
6 changed files with 124 additions and 179 deletions

View File

@@ -460,7 +460,7 @@ namespace BlackMisc
//! Dimensionless unit
static CMeasurementUnit None()
{
static Q_CONSTEXPR CMeasurementUnit::Data none(constQLatin1("none"), constQLatin1(""), NilConverter(), 0, 0);
static constexpr CMeasurementUnit::Data none(constQLatin1("none"), constQLatin1(""), NilConverter(), 0, 0);
return none;
}
};