Klaus Basan
740de9786f
Fixed function "endsStringWithNameOrSymbol" to "const"
2018-05-08 16:06:54 +02:00
Klaus Basan
787b54108e
Ref T261, made Units "static const &"
...
Remark: Maybe there is a better way than to make both values (Data and the MU itself) static const. If so we should change that.
2018-05-08 16:06:54 +02:00
Klaus Basan
7aef1dcbbc
Formatting and minor tweaks/renamings
2018-05-08 16:06:54 +02:00
Klaus Basan
23c54938ea
Ref T261, unify unit handling in situation altitude related values
...
* 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"
2018-05-08 16:06:53 +02:00
Klaus Basan
8e3b55b4ca
Ref T261, utility functions in value classes
...
* set offset values
* do not change PQs if PQ is null
* sorted by callsign
2018-05-08 16:06:52 +02:00
Klaus Basan
1f3e5c6abf
Formatting, minor tweaks
2018-05-08 16:06:43 +02:00
Klaus Basan
c1ac229875
Formatting
2018-05-08 16:06:32 +02:00
Klaus Basan
75c481228f
Missing include, fixing missing M_PI
...
Using the little "PI = std::acos(-1);" trick to avoid include issues
2018-05-08 16:06:31 +02:00
Klaus Basan
cf98c46231
Ref T259, Ref T243 return unit by reference
2018-05-04 23:03:27 +02:00
Klaus Basan
06b07ac4c6
Formatting
2018-04-13 23:36:58 +02:00
Klaus Basan
5744c260c5
Ref T259, Ref T243 improvements of PQ
...
* null()
* allow chaining for makePositive
* abs()
2018-04-05 02:54:22 +02:00
Klaus Basan
844436e744
Ref T231, Ref T238 maxValue for PQs
...
Remark: max() as function name caused compile errors
2018-01-30 20:34:45 +01:00
Klaus Basan
f049900e1f
Ref T223, use const values for standard pressure
...
* standardISASeaLevelPressure
* use static const values for standard pressure
* minor formatting
2018-01-15 23:00:34 +01:00
Klaus Basan
b2c0d726bc
Ref T215, PQ integer support
2018-01-13 05:04:33 +01:00
Klaus Basan
efd4e110b7
Ref T172, formatting
...
* this->m_ => m_
* formatting
* comments / doxygen
2017-12-28 18:44:32 +01:00
Mathew Sutcliffe
3ae5e274ee
Removed workarounds that were needed to support older versions of MSVC.
2017-11-14 17:51:02 +00:00
Roland Winklmeier
c91aa0d58e
Change template parameter to disambiguate call to QLatin1String constructor
...
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
2017-09-24 19:52:41 +01:00
Klaus Basan
3f924209f1
As a follow up of review T111, changed "void static" to "static void" for consistency.
2017-09-24 19:52:31 +01:00
Klaus Basan
58b5dd1278
Using std::copysign
2017-09-24 19:52:05 +01:00
Klaus Basan
9445bd56a3
Ref T111, normalize utility functions
2017-09-24 19:51:33 +01:00
Klaus Basan
4e45496431
Ref T111, different implementation as recommended by MS
2017-09-24 19:51:31 +01:00
Klaus Basan
f936f07c8d
Ref T120, PQ units: made final and removed virtual dtor
2017-09-24 19:51:25 +01:00
Klaus Basan
e55480737e
Ref T111, lat/lng/angle changes
...
* get struct CAngle::DegMinSecFractionalSec to obtain parts
* round to epsilon utility functions and fix (qint64)
2017-09-24 19:51:09 +01:00
Mathew Sutcliffe
fd649c0b5c
T73 Added virtual final destructors in CMeasurementUnit derived classes.
...
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.
2017-05-14 17:21:31 +01:00
Mathew Sutcliffe
07ec7e6bc1
T73 Pass units by value.
...
Class types which are trivial to copy should be passed by value.
2017-05-14 17:21:30 +01:00
Mathew Sutcliffe
c8d78ada65
T73 Flyweight pattern based on pimpl, to reduce CMeasurementUnit memory usage.
...
* 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.
2017-05-14 17:21:23 +01:00
Mathew Sutcliffe
fef2bc528e
T73 Enabled for constexpr, to take advantage of constant-initialization.
...
* 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.
2017-05-14 17:13:40 +01:00
Mathew Sutcliffe
5e4349bba6
T73 Style.
2017-05-14 15:08:04 +01:00
Mathew Sutcliffe
48482d8d1e
T73 CMeasurementUnit converter strategy based on function pointers.
...
Because function pointers are literal types, so they can be constexpr.
2017-05-14 15:08:03 +01:00
Mathew Sutcliffe
895190c4d0
T73 Fixed non-threadsafe static initialization.
2017-05-14 15:08:01 +01:00
Mathew Sutcliffe
d5ab73e1bc
Replace QRegExp with QRegularExpression
...
Reviewers: kbasan, msutcliffe
Reviewed By: kbasan, msutcliffe
Subscribers: jenkins
Differential Revision: https://dev.swift-project.org/D11
2017-05-05 23:08:35 +01:00
Mathew Sutcliffe
a8302b310e
refs #937 Resolved clazy warnings: QString::arg.
2017-04-19 19:31:45 +01:00
Mathew Sutcliffe
3ea9e33e6b
refs #937 Resolved clazy warnings: pass-by-value/reference.
2017-04-19 19:31:42 +01:00
Mathew Sutcliffe
b7f69c6887
refs #937 Resolved clazy warnings: unnecessary memory allocation.
2017-04-19 19:31:39 +01:00
Klaus Basan
b77c04c99c
refs #875 , fixed PQ null for DBus
2017-02-24 15:21:01 +00:00
Klaus Basan
e49f9c2b38
Fixed output of PQ null values
2017-02-24 00:19:02 +00:00
Mathew Sutcliffe
1c7fb518ca
Fixed broken link URLs in comments.
2017-02-24 00:18:16 +00:00
Klaus Basan
9eff387207
Removed deprecated funtions and changed code to use new functions
2017-01-10 23:47:10 +00:00
Mathew Sutcliffe
bbdbd26f82
refs #815 Throw CJsonException when required JSON objects are not found.
2017-01-10 23:46:33 +00:00
Mathew Sutcliffe
0ca9fe0a8a
refs #837 Abbreviated syntax for specifying a null unit.
2017-01-10 23:44:28 +00:00
Mathew Sutcliffe
3ab121a593
refs #802 Fixed linker errors for exported explicit template instantiations with Clang on Windows.
2016-12-13 19:00:44 +01:00
Klaus Basan
438e72555a
refs #799 , own component for view update times
...
* utility function in CTime
* settings class for update times
2016-12-13 18:59:48 +01:00
Klaus Basan
8a5d50a167
refs #780 , fixed property index compare issues found in the client
2016-12-06 09:46:57 +01:00
Klaus Basan
3ca9d729c8
refs #685 , utility function
2016-06-29 01:04:23 +02:00
Roland Winklmeier
3d7a39ed00
Fix BlackMisc header includes
...
* Include only what is used
* Use forward declaration when possible
* Sorted includes
refs #630
2016-05-13 17:05:49 +02:00
Klaus Basan
0f5d2a29a8
refs #655 , Change signature (order) of setProperty/compareProperty
2016-05-13 16:44:17 +02:00
Mathew Sutcliffe
4e9d7d3efe
refs #628 Metaclass style compatible with the AStyle beautifier.
2016-04-06 15:15:12 +01:00
Mathew Sutcliffe
0acb302c63
refs #628 Remove the old tuple system.
2016-04-03 18:17:44 +01:00
Mathew Sutcliffe
4bd4baa535
refs #628 Use the metaclass mixins in all value classes.
2016-04-03 18:17:43 +01:00
Mathew Sutcliffe
6f1cf8e3d7
refs #624 Replace typedef with using.
2016-03-22 16:02:50 +00:00