From 210f40141604ff45eab6cb19de031120c6e47c05 Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Tue, 27 Dec 2022 10:08:59 +0100 Subject: [PATCH] refactor: units ordering do need `type_name` (it also caused worse ordering on text output) --- src/core/include/units/unit.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/core/include/units/unit.h b/src/core/include/units/unit.h index f3d83ab3..2098adf7 100644 --- a/src/core/include/units/unit.h +++ b/src/core/include/units/unit.h @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include @@ -526,7 +525,7 @@ template { if ((is_derived_from_specialization_of_constant_unit && is_derived_from_specialization_of_constant_unit) || (!is_derived_from_specialization_of_constant_unit && !is_derived_from_specialization_of_constant_unit)) - return type_name() < type_name(); + return Lhs::symbol < Rhs::symbol; else // put constants at the front of units list in the expression return is_derived_from_specialization_of_constant_unit;