From 3d536fb82be77443ae163045e357a9c742af0260 Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Wed, 9 Nov 2022 22:53:27 -1000 Subject: [PATCH] refactor: Unicode symbols directly provided in the code --- src/core/include/units/generic/dimensionless.h | 2 +- src/systems/si/include/units/si/prefixes.h | 2 +- src/systems/si/include/units/si/units.h | 4 ++-- test/unit_test/static/unit_test.cpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/core/include/units/generic/dimensionless.h b/src/core/include/units/generic/dimensionless.h index 4a0d4171..92a171ac 100644 --- a/src/core/include/units/generic/dimensionless.h +++ b/src/core/include/units/generic/dimensionless.h @@ -32,7 +32,7 @@ struct one; // defined in // clang-format off inline constexpr struct percent : named_unit<"%", mag * one> {} percent; -inline constexpr struct per_mille : named_unit * one> {} per_mille; +inline constexpr struct per_mille : named_unit * one> {} per_mille; // clang-format on } // namespace units diff --git a/src/systems/si/include/units/si/prefixes.h b/src/systems/si/include/units/si/prefixes.h index 955a74ca..1e536bbd 100644 --- a/src/systems/si/include/units/si/prefixes.h +++ b/src/systems/si/include/units/si/prefixes.h @@ -33,7 +33,7 @@ template struct atto_ : prefixed_unit<"a", mag_power<10, template struct femto_ : prefixed_unit<"f", mag_power<10, -15>, U> {}; template struct pico_ : prefixed_unit<"p", mag_power<10, -12>, U> {}; template struct nano_ : prefixed_unit<"n", mag_power<10, -9>, U> {}; -template struct micro_ : prefixed_unit, U> {}; +template struct micro_ : prefixed_unit, U> {}; template struct milli_ : prefixed_unit<"m", mag_power<10, -3>, U> {}; template struct centi_ : prefixed_unit<"c", mag_power<10, -2>, U> {}; template struct deci_ : prefixed_unit<"d", mag_power<10, -1>, U> {}; diff --git a/src/systems/si/include/units/si/units.h b/src/systems/si/include/units/si/units.h index 05b08a4b..1c7e5000 100644 --- a/src/systems/si/include/units/si/units.h +++ b/src/systems/si/include/units/si/units.h @@ -50,12 +50,12 @@ inline constexpr struct watt : named_unit<"W", joule / second> {} watt; inline constexpr struct coulomb : named_unit<"C", ampere * second> {} coulomb; inline constexpr struct volt : named_unit<"V", watt / ampere> {} volt; inline constexpr struct farad : named_unit<"F", coulomb / volt> {} farad; -inline constexpr struct ohm : named_unit {} ohm; +inline constexpr struct ohm : named_unit {} ohm; inline constexpr struct siemens : named_unit<"S", 1 / ohm> {} siemens; inline constexpr struct weber : named_unit<"Wb", volt * second> {} weber; inline constexpr struct tesla : named_unit<"T", weber / square> {} tesla; inline constexpr struct henry : named_unit<"H", weber / ampere> {} henry; -inline constexpr struct degree_Celsius : named_unit {} degree_Celsius; +inline constexpr struct degree_Celsius : named_unit {} degree_Celsius; inline constexpr struct lumen : named_unit<"lm", candela * steradian> {} lumen; inline constexpr struct lux : named_unit<"lx", lumen / square> {} lux; inline constexpr struct becquerel : named_unit<"Bq", 1 / second> {} becquerel; diff --git a/test/unit_test/static/unit_test.cpp b/test/unit_test/static/unit_test.cpp index 3b0427ed..0b470bd3 100644 --- a/test/unit_test/static/unit_test.cpp +++ b/test/unit_test/static/unit_test.cpp @@ -60,7 +60,7 @@ inline constexpr struct newton_ : named_unit<"N", kilogram * metre / square> {} pascal; inline constexpr struct joule_ : named_unit<"J", newton * metre> {} joule; inline constexpr struct watt_ : named_unit<"W", joule / second> {} watt; -inline constexpr struct degree_Celsius_ : named_unit {} degree_Celsius; +inline constexpr struct degree_Celsius_ : named_unit {} degree_Celsius; inline constexpr struct minute_ : named_unit<"min", mag<60> * second> {} minute; inline constexpr struct hour_ : named_unit<"h", mag<60> * minute> {} hour;