From 38ec932ebe2aa512fcc752516b1218747423e73c Mon Sep 17 00:00:00 2001 From: Tyler Karaszewski Date: Mon, 10 Feb 2025 10:47:38 -0800 Subject: [PATCH] Clean up remaining files in libstuff --- libstuff/SPerformanceTimer.cpp | 2 +- libstuff/SPerformanceTimer.h | 2 +- libstuff/STCPManager.cpp | 2 +- libstuff/STCPManager.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libstuff/SPerformanceTimer.cpp b/libstuff/SPerformanceTimer.cpp index 8070b6e34..7d5d83672 100644 --- a/libstuff/SPerformanceTimer.cpp +++ b/libstuff/SPerformanceTimer.cpp @@ -1,7 +1,7 @@ #include #include "SPerformanceTimer.h" -SPerformanceTimer::SPerformanceTimer(string description, map defaults) +SPerformanceTimer::SPerformanceTimer(const string& description, const map& defaults) : _description(description), _lastLogStart(chrono::steady_clock::now()), _defaults(defaults), diff --git a/libstuff/SPerformanceTimer.h b/libstuff/SPerformanceTimer.h index 459b78bba..b68b0bdc2 100644 --- a/libstuff/SPerformanceTimer.h +++ b/libstuff/SPerformanceTimer.h @@ -3,7 +3,7 @@ class SPerformanceTimer { public: - SPerformanceTimer(string description, map defaults = {}); + SPerformanceTimer(const string& description, const map& defaults = {}); void start(const string& type); void stop(); void log(chrono::steady_clock::duration elapsed); diff --git a/libstuff/STCPManager.cpp b/libstuff/STCPManager.cpp index 45d9b92a2..a279a953c 100644 --- a/libstuff/STCPManager.cpp +++ b/libstuff/STCPManager.cpp @@ -342,7 +342,7 @@ unique_ptr STCPManager::openPort(const string& host, int rema return make_unique(s, host); } -STCPManager::Port::Port(int _s, string _host) : s(_s), host(_host) +STCPManager::Port::Port(int _s, const string& _host) : s(_s), host(_host) { } diff --git a/libstuff/STCPManager.h b/libstuff/STCPManager.h index 4eda44b1a..b145500d4 100644 --- a/libstuff/STCPManager.h +++ b/libstuff/STCPManager.h @@ -64,7 +64,7 @@ struct STCPManager { class Port { public: - Port(int _s, string _host); + Port(int _s, const string& _host); ~Port(); // Attributes