* separator can cause issue when sending data (WebService, FSD)
* re-parsing (print and parse again) can cause to undesired results as the separator is mistaken as decimal separator with a different locale
* separator now a parameter so it can still be used
- nthIndexOf
- measurement unit can be parsed case insensitive
- CSimpleCommandParser::remainingStringAfter from n-th space
- improved frequency parsing
Keeping them defined in-class caused linker issues with the extern template
declaration in a non-optimized MinGW debug build. Apparently it did not
inline them but instead relied on the extern declaration and expected
them defined somewhere else.
* this is an optimization, it would work without that, but there are numerous calculations in interpolation which are faster and easier to debug in the same unit
* PQ switch unit functions use "const &PQUnit"
Summary:
Qt 5.10 added a new constructor overload which made the call to QLatin1String
constructor with size_t as second parameter ambigious.
Reviewers: #swift_pilot_client, msutcliffe
Reviewed By: #swift_pilot_client, msutcliffe
Subscribers: jenkins
Differential Revision: https://dev.swift-project.org/D47
This fixes the GCC warning "deleting polymorphic object with non-virtual destructor".
They are marked final so the virtual dispatch can be optimized out, because they don't need to be overridden.
* All members of CMeasurementUnit moved into nested pimpl class Data.
* CMeasurementUnit has only one member: a pointer to a const Data.
* Static const CMeasurementUnits replaced with static const Datas.
* Each CMeasurementUnit singleton method returns by-value a CMeasurementUnit containing a pointer to a static const Data.
* Means CMeasurementUnit is trivial to copy because we never copy the pimpl members.
** Works because the available units are fixed at compile time so we never need to create novel units at runtime.
* CMeasurementUnit and every one of its members is a literal type.
** This requires using QLatin1String instead of QString.
* Every static const CMeasurementUnit is static constexpr.
** This means they are initialized at compile time, no runtime initialization needed.