summaryrefslogtreecommitdiffstats
path: root/server/src/trace.cppm
diff options
context:
space:
mode:
authorRutger Broekhoff2026-08-28 22:22:24 +0200
committerRutger Broekhoff2026-08-28 22:22:24 +0200
commitb0d7600970d2fdb1eb6fff813c7336ea34d4e228 (patch)
tree051d6f80c7e332f4b31027025ae7c60c7ac70742 /server/src/trace.cppm
parent70643a9e4821bd11c3f363f1708fe420965467d1 (diff)
downloadroutemon-b0d7600970d2fdb1eb6fff813c7336ea34d4e228.tar.gz
routemon-b0d7600970d2fdb1eb6fff813c7336ea34d4e228.zip
Indent tweaks
Diffstat (limited to 'server/src/trace.cppm')
-rw-r--r--server/src/trace.cppm14
1 files changed, 7 insertions, 7 deletions
diff --git a/server/src/trace.cppm b/server/src/trace.cppm
index 3dbed12..35d32f3 100644
--- a/server/src/trace.cppm
+++ b/server/src/trace.cppm
@@ -21,9 +21,9 @@ public:
21 { 21 {
22 namespace chrono = std::chrono; 22 namespace chrono = std::chrono;
23 auto const unix_time_ms_signed = static_cast<std::int64_t>( 23 auto const unix_time_ms_signed = static_cast<std::int64_t>(
24 chrono::duration_cast<chrono::milliseconds>( 24 chrono::duration_cast<chrono::milliseconds>(
25 chrono::system_clock::now().time_since_epoch()) 25 chrono::system_clock::now().time_since_epoch())
26 .count()); 26 .count());
27 if (unix_time_ms_signed < 0) 27 if (unix_time_ms_signed < 0)
28 throw std::runtime_error{"system time before UNIX epoch"}; 28 throw std::runtime_error{"system time before UNIX epoch"};
29 auto const unix_time_ms = static_cast<std::uint64_t>(unix_time_ms_signed); 29 auto const unix_time_ms = static_cast<std::uint64_t>(unix_time_ms_signed);
@@ -36,8 +36,8 @@ public:
36 { 36 {
37 unsigned long e = ERR_get_error(); 37 unsigned long e = ERR_get_error();
38 throw std::runtime_error{std::format( 38 throw std::runtime_error{std::format(
39 "failed to generate UUID(v7): {} ({}, code {})", 39 "failed to generate UUID(v7): {} ({}, code {})",
40 ERR_reason_error_string(e), ERR_lib_error_string(e), e)}; 40 ERR_reason_error_string(e), ERR_lib_error_string(e), e)};
41 } 41 }
42 42
43 auto version = std::uint64_t{0b0111}; 43 auto version = std::uint64_t{0b0111};
@@ -67,8 +67,8 @@ public:
67 auto low_low = (low_ & 0x0000'ffff'ffff'ffff) >> 0; 67 auto low_low = (low_ & 0x0000'ffff'ffff'ffff) >> 0;
68 68
69 std::format_to( 69 std::format_to(
70 target.begin(), "{:0>8x}-{:0>4x}-{:0>4x}-{:0>4x}-{:0>12x}", high_high, 70 target.begin(), "{:0>8x}-{:0>4x}-{:0>4x}-{:0>4x}-{:0>12x}", high_high,
71 high_low_high, low_low_high, high_low, low_low); 71 high_low_high, low_low_high, high_low, low_low);
72 target.back() = '\0'; 72 target.back() = '\0';
73 } 73 }
74}; 74};