From 33895cf225fb8bd25b032960861670e35c13149d Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Mon, 22 Apr 2024 15:48:40 -0400 Subject: [PATCH] xo-unit: minor: code layout in dim_util.hpp --- include/xo/unit/dim_util.hpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/include/xo/unit/dim_util.hpp b/include/xo/unit/dim_util.hpp index b3b9a365..b00e2126 100644 --- a/include/xo/unit/dim_util.hpp +++ b/include/xo/unit/dim_util.hpp @@ -2,8 +2,6 @@ #pragma once -//#include "stringliteral.hpp" -//#include "xo/flatstring/flatstring.hpp" #include namespace xo { @@ -35,11 +33,11 @@ namespace xo { dim2str(dim x) { switch(x) { - case dim::mass: return "mass"; + case dim::mass: return "mass"; case dim::distance: return "distance"; - case dim::time: return "time"; + case dim::time: return "time"; case dim::currency: return "currency"; - case dim::price: return "price"; + case dim::price: return "price"; default: break; } return "?dim"; @@ -59,19 +57,19 @@ namespace xo { struct native_unit_for; template <> - struct native_unit_for { static constexpr auto value = native_unit_id::gram; }; + struct native_unit_for { static constexpr auto value = native_unit_id::gram; }; template <> - struct native_unit_for { static constexpr auto value = native_unit_id::meter; }; + struct native_unit_for { static constexpr auto value = native_unit_id::meter; }; template <> - struct native_unit_for { static constexpr auto value = native_unit_id::second; }; + struct native_unit_for { static constexpr auto value = native_unit_id::second; }; template <> struct native_unit_for { static constexpr auto value = native_unit_id::currency; }; template <> - struct native_unit_for { static constexpr auto value = native_unit_id::price; }; + struct native_unit_for { static constexpr auto value = native_unit_id::price; }; template constexpr auto native_unit_for_v = native_unit_for::value;