Skip to content

Commit 746f5cd

Browse files
[pre-commit.ci] pre-commit autoupdate (#403)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/pre-commit/mirrors-clang-format: v20.1.8 → v21.1.0](pre-commit/mirrors-clang-format@v20.1.8...v21.1.0) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent d752db6 commit 746f5cd

File tree

3 files changed

+53
-50
lines changed

3 files changed

+53
-50
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ repos:
5757
- id: end-of-file-fixer
5858
- id: check-shebang-scripts-are-executable
5959
- repo: https://github.com/pre-commit/mirrors-clang-format
60-
rev: v20.1.8
60+
rev: v21.1.0
6161
hooks:
6262
- id: clang-format
6363
types_or: [c++, c]

units/r20_conv.cpp

Lines changed: 48 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,10 @@ namespace precise {
130130
"32",
131131
"kilogram per air dry metric ton",
132132
kg / precise_unit(t, commodities::packaging::dry)},
133-
unitD{"33", "kilopascal square metre per gram", kilo* Pa* m.pow(2) / g},
133+
unitD{
134+
"33",
135+
"kilopascal square metre per gram",
136+
kilo * Pa * m.pow(2) / g},
134137
unitD{"34", "kilopascal per millimetre", kilo* Pa / mm},
135138
unitD{
136139
"35",
@@ -219,7 +222,7 @@ namespace precise {
219222
unitD{"5K", "count per minute", count / minute},
220223
unitD{"5P", "seismic level", special::moment_magnitude},
221224
unitD{"5Q", "seismic line", special::moment_energy},
222-
unitD{"60", "percent weight", percent* pu* kg},
225+
unitD{"60", "percent weight", percent * pu * kg},
223226
unitD{"61", "part per billion", other::ppb},
224227
unitD{"62", "percent per 1000 hour", percent / (thousand * hr)},
225228
unitD{
@@ -413,7 +416,7 @@ namespace precise {
413416
unitD{"A85", "gigaelectronvolt", giga* energy::eV},
414417
unitD{"A86", "gigahertz", giga* Hz},
415418
unitD{"A87", "gigaohm", giga* ohm},
416-
unitD{"A88", "gigaohm metre", giga* ohm* m},
419+
unitD{"A88", "gigaohm metre", giga * ohm * m},
417420
unitD{"A89", "gigapascal", giga* Pa},
418421
unitD{"A9", "rate", count / s},
419422
unitD{"A90", "gigawatt", giga* W},
@@ -527,10 +530,10 @@ namespace precise {
527530
unitD{"B45", "kilomole", kilo* mol},
528531
unitD{"B46", "kilomole per cubic metre", kilo* mol / m.pow(3)},
529532
unitD{"B47", "kilonewton", kilo* N},
530-
unitD{"B48", "kilonewton metre", kilo* N* m},
533+
unitD{"B48", "kilonewton metre", kilo * N * m},
531534
unitD{"B49", "kiloohm", kilo* ohm},
532535
unitD{"B5", "billet", {1.0, count, commodities::packaging::billet}},
533-
unitD{"B50", "kiloohm metre", kilo* ohm* m},
536+
unitD{"B50", "kiloohm metre", kilo * ohm * m},
534537
unitD{"B51", "kilopond", kilo* gm::pond},
535538
unitD{"B52", "kilosecond", kilo* s},
536539
unitD{"B53", "kilosiemens", kilo* S},
@@ -556,9 +559,9 @@ namespace precise {
556559
unitD{"B71", "megaelectronvolt", mega* energy::eV},
557560
unitD{"B72", "megagram per cubic metre", mega* g / m.pow(3)},
558561
unitD{"B73", "meganewton", mega* N},
559-
unitD{"B74", "meganewton metre", mega* N* m},
562+
unitD{"B74", "meganewton metre", mega * N * m},
560563
unitD{"B75", "megaohm", mega* ohm},
561-
unitD{"B76", "megaohm metre", mega* ohm* m},
564+
unitD{"B76", "megaohm metre", mega * ohm * m},
562565
unitD{"B77", "megasiemens per metre", mega* S / m},
563566
unitD{"B78", "megavolt", mega* V},
564567
unitD{"B79", "megavolt per metre", mega* V / m},
@@ -583,9 +586,9 @@ namespace precise {
583586
unitD{"B90", "microhenry", micro* H},
584587
unitD{"B91", "microhenry per metre", micro* H / m},
585588
unitD{"B92", "micronewton", micro* N},
586-
unitD{"B93", "micronewton metre", micro* N* m},
589+
unitD{"B93", "micronewton metre", micro * N * m},
587590
unitD{"B94", "microohm", micro* ohm},
588-
unitD{"B95", "microohm metre", micro* ohm* m},
591+
unitD{"B95", "microohm metre", micro * ohm * m},
589592
unitD{"B96", "micropascal", micro* Pa},
590593
unitD{"B97", "microradian", micro* rad},
591594
unitD{"B98", "microsecond", micro* s},
@@ -640,8 +643,8 @@ namespace precise {
640643
unitD{"C20", "millinewton", milli* N},
641644
unitD{"C21", "kibibit", kibi* data::bit},
642645
unitD{"C22", "millinewton per metre", milli* N / m},
643-
unitD{"C23", "milliohm metre", milli* ohm* m},
644-
unitD{"C24", "millipascal second", milli* Pa* s},
646+
unitD{"C23", "milliohm metre", milli * ohm * m},
647+
unitD{"C24", "millipascal second", milli * Pa * s},
645648
unitD{"C25", "milliradian", milli* rad},
646649
unitD{"C26", "millisecond", milli* s},
647650
unitD{"C27", "millisiemens", milli* S},
@@ -665,15 +668,15 @@ namespace precise {
665668
unitD{"C43", "nanohenry", nano* H},
666669
unitD{"C44", "nanohenry per metre", nano* H / m},
667670
unitD{"C45", "nanometre", nano* m},
668-
unitD{"C46", "nanoohm metre", nano* ohm* m},
671+
unitD{"C46", "nanoohm metre", nano * ohm * m},
669672
unitD{"C47", "nanosecond", nano* s},
670673
unitD{"C48", "nanotesla", nano* T},
671674
unitD{"C49", "nanowatt", nano* W},
672675
unitD{"C5", "cost", {1.0, currency, commodities::packaging::actual}},
673676
unitD{"C50", "neper", log::neper},
674677
unitD{"C51", "neper per second", log::neper / s},
675678
unitD{"C52", "picometre", pico* m},
676-
unitD{"C53", "newton metre second", N* m* s},
679+
unitD{"C53", "newton metre second", N * m * s},
677680
unitD{
678681
"C54",
679682
"newton metre squared per kilogram squared",
@@ -704,7 +707,7 @@ namespace precise {
704707
unitD{"C76", "picowatt per square metre", pico* W / m.pow(2)},
705708
unitD{"C77", "pound gage", lb* eflag},
706709
unitD{"C78", "pound-force", lbf},
707-
unitD{"C79", "kilovolt ampere hour", kilo* V* A* hr},
710+
unitD{"C79", "kilovolt ampere hour", kilo * V * A* hr},
708711
unitD{"C8", "millicoulomb per kilogram", milli* C / kg},
709712
unitD{"C80", "RAD", cgs::RAD},
710713
unitD{"C81", "radian", rad},
@@ -830,7 +833,7 @@ namespace precise {
830833
unitD{"D29", "terahertz", tera* Hz},
831834
unitD{"D30", "terajoule", tera* J},
832835
unitD{"D31", "terawatt", tera* W},
833-
unitD{"D32", "terawatt hour", tera* W* hr},
836+
unitD{"D32", "terawatt hour", tera * W * hr},
834837
unitD{"D33", "tesla", tesla},
835838
unitD{"D34", "tex", textile::tex},
836839
unitD{"D35", "calorie (thermochemical)", energy::cal_th},
@@ -920,7 +923,7 @@ namespace precise {
920923
unitD{"D80", "microwatt", micro* W},
921924
unitD{"D81", "microtesla", micro* T},
922925
unitD{"D82", "microvolt", micro* V},
923-
unitD{"D83", "millinewton metre", milli* N* m},
926+
unitD{"D83", "millinewton metre", milli * N * m},
924927
unitD{"D85", "microwatt per square metre", micro* W / m.pow(2)},
925928
unitD{"D86", "millicoulomb", milli* C},
926929
unitD{"D87", "millimole per kilogram", milli* mol / kg},
@@ -960,7 +963,7 @@ namespace precise {
960963
unitD{"DMO", "standard kilolitre", kilo* L},
961964
unitD{"DMQ", "cubic decimetre", (deci * m).pow(3)},
962965
unitD{"DMT", "decimetre", deci* m},
963-
unitD{"DN", "decinewton metre", deci* N* m},
966+
unitD{"DN", "decinewton metre", deci * N * m},
964967
unitD{
965968
"DPC",
966969
"dozen piece",
@@ -991,7 +994,7 @@ namespace precise {
991994
unitD{"E01", "newton per square centimetre", N / cm.pow(2)},
992995
unitD{"E07", "megawatt hour per hour", electrical::MW* hr / hr},
993996
unitD{"E08", "megawatt per hertz", electrical::MW / Hz},
994-
unitD{"E09", "milliampere hour", milli* A* hr},
997+
unitD{"E09", "milliampere hour", milli * A * hr},
995998
unitD{"E10", "degree day", deg* day},
996999
unitD{"E11", "gigacalorie", giga* energy::cal_it},
9971000
unitD{"E12", "mille", {1000.0, count, commodities::cigarette}},
@@ -1045,8 +1048,8 @@ namespace precise {
10451048
"kilogram-force metre per square centimetre",
10461049
precise::kilo* precise::gm::pond* m / cm.pow(2)},
10471050
unitD{"E45", "milliohm", milli* ohm},
1048-
unitD{"E46", "kilowatt hour per cubic metre", kilo* W* hr / m.pow(3)},
1049-
unitD{"E47", "kilowatt hour per kelvin", kilo* W* hr / K},
1051+
unitD{"E46", "kilowatt hour per cubic metre", kilo * W * hr / m.pow(3)},
1052+
unitD{"E47", "kilowatt hour per kelvin", kilo * W * hr / K},
10501053
unitD{"E48", "service unit", {1.0, count, commodities::service}},
10511054
unitD{"E49", "working day", {1.0, day, commodities::labor}},
10521055
unitD{"E5", "metric long ton", av::longton},
@@ -1112,7 +1115,7 @@ namespace precise {
11121115
unitD{"F01", "bit per cubic metre", data::bit / m.pow(3)},
11131116
unitD{"F02", "kelvin per kelvin", pu* K},
11141117
unitD{"F03", "kilopascal per bar", kilo* Pa / bar},
1115-
unitD{"F04", "millibar per bar", milli* pu* bar},
1118+
unitD{"F04", "millibar per bar", milli * pu * bar},
11161119
unitD{"F05", "megapascal per bar", mega* Pa / bar},
11171120
unitD{"F06", "poise per bar", cgs::poise / bar},
11181121
unitD{"F07", "pascal per bar", Pa / bar},
@@ -1209,21 +1212,21 @@ namespace precise {
12091212
unitD{"F90", "newton metre per ampere", N* m / A},
12101213
unitD{"F91", "bar litre per second", bar* L / s},
12111214
unitD{"F92", "bar cubic metre per second", bar* m.pow(3) / s},
1212-
unitD{"F93", "hectopascal litre per second", hecto* Pa* L / s},
1215+
unitD{"F93", "hectopascal litre per second", hecto * Pa * L / s},
12131216
unitD{
12141217
"F94",
12151218
"hectopascal cubic metre per second",
1216-
hecto* Pa* m.pow(3) / s},
1217-
unitD{"F95", "millibar litre per second", milli* bar* L / s},
1219+
hecto * Pa * m.pow(3) / s},
1220+
unitD{"F95", "millibar litre per second", milli * bar * L / s},
12181221
unitD{
12191222
"F96",
12201223
"millibar cubic metre per second",
1221-
milli* bar* m.pow(3) / s},
1222-
unitD{"F97", "megapascal litre per second", mega* Pa* L / s},
1224+
milli * bar * m.pow(3) / s},
1225+
unitD{"F97", "megapascal litre per second", mega * Pa * L / s},
12231226
unitD{
12241227
"F98",
12251228
"megapascal cubic metre per second",
1226-
mega* Pa* m.pow(3) / s},
1229+
mega * Pa * m.pow(3) / s},
12271230
unitD{"F99", "pascal litre per second", Pa* L / s},
12281231
unitD{"FAH", "degree Fahrenheit", degF},
12291232
unitD{"FAR", "farad", F},
@@ -1418,7 +1421,7 @@ namespace precise {
14181421
"GW",
14191422
"gallon per thousand cubic foot",
14201423
us::gallon / (kilo * ft.pow(3))},
1421-
unitD{"GWH", "gigawatt hour", giga* W* hr},
1424+
unitD{"GWH", "gigawatt hour", giga * W * hr},
14221425
unitD{"GY", "gross yard", yd},
14231426
unitD{"GZ", "gage system", eflag},
14241427
unitD{"H03", "henry per kiloohm", H / (kilo * ohm)},
@@ -1461,7 +1464,7 @@ namespace precise {
14611464
unitD{"H36", "megaohm per kilometre", mega* ohm / km},
14621465
unitD{"H37", "megaohm per metre", mega* ohm / m},
14631466
unitD{"H38", "megaampere", mega* A},
1464-
unitD{"H39", "megahertz kilometre", mega* Hz* km},
1467+
unitD{"H39", "megahertz kilometre", mega * Hz * km},
14651468
unitD{"H40", "newton per ampere", N / A},
14661469
unitD{
14671470
"H41",
@@ -1524,7 +1527,7 @@ namespace precise {
15241527
unitD{"H84", "gram millimetre", g* mm},
15251528
unitD{"H85", "reciprocal week", time::week.inv()},
15261529
unitD{"H87", "piece", {1.0, one, commodities::packaging::piece}},
1527-
unitD{"H88", "megaohm kilometre", mega* ohm* km},
1530+
unitD{"H88", "megaohm kilometre", mega * ohm * km},
15281531
unitD{"H89", "percent per ohm", percent / ohm},
15291532
unitD{"H90", "percent per degree", percent / deg},
15301533
unitD{
@@ -1622,14 +1625,14 @@ namespace precise {
16221625
unitD{
16231626
"J19",
16241627
"degree Fahrenheit hour square foot per British thermal unit (thermochemical)",
1625-
degF* hr* ft.pow(2) / energy::btu_th},
1628+
degF * hr * ft.pow(2) / energy::btu_th},
16261629
unitD{"J2", "joule per kilogram", J / kg},
16271630
unitD{"J20", "degree Fahrenheit per kelvin", degF / K},
16281631
unitD{"J21", "degree Fahrenheit per bar", degF / bar},
16291632
unitD{
16301633
"J22",
16311634
"degree Fahrenheit hour square foot per British thermal unit (international table)",
1632-
degF* hr* ft.pow(2) / energy::btu_it},
1635+
degF * hr * ft.pow(2) / energy::btu_it},
16331636
unitD{"J23", "degree Fahrenheit per hour", degF / hr},
16341637
unitD{"J24", "degree Fahrenheit per minute", degF / minute},
16351638
unitD{"J25", "degree Fahrenheit per second", degF / s},
@@ -1733,7 +1736,7 @@ namespace precise {
17331736
unitD{"J69", "bushel (US dry) per hour", us::dry::bushel / hr},
17341737
unitD{"J70", "bushel (US dry) per minute", us::dry::bushel / minute},
17351738
unitD{"J71", "bushel (US dry) per second", us::dry::bushel / s},
1736-
unitD{"J72", "centinewton metre", centi* N* m},
1739+
unitD{"J72", "centinewton metre", centi * N * m},
17371740
unitD{"J73", "centipoise per kelvin", centi* cgs::poise / K},
17381741
unitD{"J74", "centipoise per bar", centi* cgs::poise / bar},
17391742
unitD{"J75", "calorie (mean)", energy::cal_mean},
@@ -2029,7 +2032,7 @@ namespace precise {
20292032
unitD{"KTM", "kilometre", km},
20302033
unitD{"KTN", "kilotonne", kilo* t},
20312034
unitD{"KUR", "kilogram of uranium", {1.0, kg, commodities::uranium}},
2032-
unitD{"KVA", "kilovolt - ampere", kilo* V* A},
2035+
unitD{"KVA", "kilovolt - ampere", kilo * V * A},
20332036
unitD{"KVR", "kilovar", kilo* electrical::VAR},
20342037
unitD{"KVT", "kilovolt", electrical::kV},
20352038
unitD{"KW", "kilogram per millimetre", kg / mm},
@@ -2048,8 +2051,8 @@ namespace precise {
20482051
"L14",
20492052
"square metre hour degree Celsius per kilocalorie (international table)",
20502053
m.pow(2) * hr* degC / (kilo * energy::cal_it)},
2051-
unitD{"L15", "millipascal second per kelvin", milli* Pa* s / K},
2052-
unitD{"L16", "millipascal second per bar", milli* Pa* s / bar},
2054+
unitD{"L15", "millipascal second per kelvin", milli * Pa * s / K},
2055+
unitD{"L16", "millipascal second per bar", milli * Pa * s / bar},
20532056
unitD{"L17", "milligram per cubic metre kelvin", mg / (m.pow(3) * K)},
20542057
unitD{"L18", "milligram per cubic metre bar", mg / (m.pow(3) * bar)},
20552058
unitD{"L19", "millilitre per litre", mL / L},
@@ -2216,8 +2219,8 @@ namespace precise {
22162219
unitD{"M14", "cubic yard per psi", yd.pow(3) / pressure::psi},
22172220
unitD{"M15", "cubic yard per minute", yd.pow(3) / minute},
22182221
unitD{"M16", "cubic yard per second", yd.pow(3) / s},
2219-
unitD{"M17", "kilohertz metre", kilo* Hz* m},
2220-
unitD{"M18", "gigahertz metre", giga* Hz* m},
2222+
unitD{"M17", "kilohertz metre", kilo * Hz * m},
2223+
unitD{"M18", "gigahertz metre", giga * Hz * m},
22212224
unitD{"M19", "Beaufort", special::beaufort},
22222225
unitD{"M20", "reciprocal megakelvin", (mega * K).inv()},
22232226
unitD{
@@ -2232,7 +2235,7 @@ namespace precise {
22322235
unitD{"M24", "ohm kilometre", ohm* km},
22332236
unitD{"M25", "percent per degree Celsius", percent / degC},
22342237
unitD{"M26", "gigaohm per metre", giga* ohm / m},
2235-
unitD{"M27", "megahertz metre", mega* Hz* m},
2238+
unitD{"M27", "megahertz metre", mega * Hz * m},
22362239
unitD{"M29", "kilogram per kilogram", pu* kg},
22372240
unitD{
22382241
"M30",
@@ -2365,8 +2368,8 @@ namespace precise {
23652368
unitD{"MTR", "metre", m},
23662369
unitD{"MTS", "metre per second", m / s},
23672370
unitD{"MV", "number of mults", count},
2368-
unitD{"MVA", "megavolt - ampere", mega* V* A},
2369-
unitD{"MWH", "megawatt hour", mega* W* hr},
2371+
unitD{"MVA", "megavolt - ampere", mega * V * A},
2372+
unitD{"MWH", "megawatt hour", mega * W * hr},
23702373
unitD{"N1", "pen calorie", cal},
23712374
unitD{"N10", "pound foot per second", lb* ft / s},
23722375
unitD{"N11", "pound inch per second", lb* in / s},
@@ -2548,11 +2551,11 @@ namespace precise {
25482551
"N88",
25492552
"degree Fahrenheit hour square foot per British thermal unit "
25502553
"(international table) inch",
2551-
degF* hr* ft.pow(2) / energy::btu_it / in},
2554+
degF * hr * ft.pow(2) / energy::btu_it / in},
25522555
unitD{
25532556
"N89",
25542557
"degree Fahrenheit hour square foot per British thermal unit (thermochemical) inch",
2555-
degF* hr* ft.pow(2) / energy::btu_th / in},
2558+
degF * hr * ft.pow(2) / energy::btu_th / in},
25562559
unitD{"N90", "kilofarad", kilo* F},
25572560
unitD{"N91", "reciprocal joule", J.inv()},
25582561
unitD{"N92", "picosiemens", pico* S},
@@ -2897,7 +2900,7 @@ namespace precise {
28972900
unitD{"RPM", "revolutions per minute", rpm},
28982901
unitD{"RPS", "revolutions per second", {constants::tau, rad* Hz}},
28992902
unitD{"RS", "reset", {1.0, count, commodities::reset}},
2900-
unitD{"RT", "revenue ton mile", currency* ton* mile},
2903+
unitD{"RT", "revenue ton mile", currency * ton * mile},
29012904
unitD{"RU", "run", {1.0, count, commodities::packaging::run}},
29022905
unitD{"S3", "square foot per second", ft.pow(2) / s},
29032906
unitD{"S4", "square metre per second", m.pow(2) / s},
@@ -2996,7 +2999,7 @@ namespace precise {
29962999
"thousand linear inch",
29973000
{1000.0, in, commodities::packaging::linear}},
29983001
unitD{"TA", "tenth cubic foot", {0.1, ft.pow(3)}},
2999-
unitD{"TAH", "kiloampere hour", kilo* A* hr},
3002+
unitD{"TAH", "kiloampere hour", kilo * A * hr},
30003003
unitD{"TAN", "total acid number", generate_custom_unit(213)},
30013004
unitD{"TC", "truckload", {1.0, count, commodities::packaging::truck}},
30023005
unitD{"TD", "therm", energy::therm_ec},

units/unit_definitions.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ namespace precise {
210210
constexpr precise_unit nm{1e-9, m};
211211

212212
// Volume units
213-
constexpr precise_unit L{0.001, m* m* m};
213+
constexpr precise_unit L{0.001, m * m * m};
214214
constexpr precise_unit mL{0.001, L};
215215
// mass units
216216
constexpr precise_unit g{0.001, kg};
@@ -240,7 +240,7 @@ namespace precise {
240240
constexpr precise_unit roentgen{2.58e-4, C / kg};
241241
constexpr precise_unit REM{0.01, precise::Sv};
242242
constexpr precise_unit RAD{100, erg / g};
243-
constexpr precise_unit emu{0.001, A* m* m};
243+
constexpr precise_unit emu{0.001, A * m * m};
244244
constexpr precise_unit langley{41840.0, J / m.pow(2)};
245245
constexpr precise_unit unitpole{1.256637061436e-7, Wb};
246246
constexpr precise_unit statC_charge{10.0 / c_const, C};
@@ -403,7 +403,7 @@ namespace precise {
403403
// volume
404404
constexpr precise_unit minim{61.611519921875, micro* L};
405405
constexpr precise_unit dram{60.0, minim};
406-
constexpr precise_unit floz{29.5735295625e-6, m* m* m};
406+
constexpr precise_unit floz{29.5735295625e-6, m * m * m};
407407
constexpr precise_unit tbsp{0.5, floz};
408408
constexpr precise_unit tsp{1.0 / 6.0, floz};
409409
constexpr precise_unit pinch{0.125, tsp};
@@ -1417,7 +1417,7 @@ namespace precise {
14171417
constexpr precise_unit faraday{96485.3321233100184, C};
14181418
// others
14191419
constexpr precise_unit rpm{constants::pi / 30.0, rad* Hz};
1420-
constexpr precise_unit CFM(ft* ft* ft / minute);
1420+
constexpr precise_unit CFM(ft * ft * ft / minute);
14211421

14221422
constexpr precise_unit MegaBuck{1000000.0, currency};
14231423
constexpr precise_unit GigaBuck{1000.0, MegaBuck};

0 commit comments

Comments
 (0)