From 627d35e0d1e5a6a31c116c90a5b7f839385caea1 Mon Sep 17 00:00:00 2001 From: helintong Date: Sat, 14 Sep 2024 17:27:03 +0800 Subject: [PATCH] fix: delete empty macro and clang-format --- include/cinatra/ylt/metric/system_metric.hpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/include/cinatra/ylt/metric/system_metric.hpp b/include/cinatra/ylt/metric/system_metric.hpp index cbd6ed59..088e6e60 100644 --- a/include/cinatra/ylt/metric/system_metric.hpp +++ b/include/cinatra/ylt/metric/system_metric.hpp @@ -406,7 +406,7 @@ inline void stat_io() { ProcIO s{}; #if defined(__GUNC__) auto stream_file = - std::shared_ptr(fopen("/proc/self/io", "r"), [](FILE *ptr) { + std::shared_ptr(fopen("/proc/self/io", "r"), [](FILE* ptr) { fclose(ptr); }); if (stream_file == nullptr) { @@ -421,9 +421,6 @@ inline void stat_io() { } #endif -#if defined(__APPLE__) -#endif - #if defined(WIN32) DWORD current_process_id = GetCurrentProcessId(); // open process @@ -567,7 +564,7 @@ inline void process_status() { if (read_command_output_through_popen(oss, cmdbuf) != 0) { return; } - const std::string &result = oss.str(); + const std::string& result = oss.str(); if (sscanf(result.c_str(), "%d %d %d %d" "%d %u %ld %ld",