From 9739de9a62a9ae8173fff748268eecc73d559f39 Mon Sep 17 00:00:00 2001 From: Nan Zhou Date: Wed, 6 Apr 2022 11:07:27 -0700 Subject: hostlogger service: don't reference integerals Copying integerals is cheap, and generally is cheaper than copying references. Tested: compiles. Signed-off-by: Nan Zhou Change-Id: I5cb08445d6bc06ed1d0c86c27ca1db1bf4cce316 --- redfish-core/include/gzfile.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'redfish-core') diff --git a/redfish-core/include/gzfile.hpp b/redfish-core/include/gzfile.hpp index 696b13c633..a77c6ab482 100644 --- a/redfish-core/include/gzfile.hpp +++ b/redfish-core/include/gzfile.hpp @@ -9,7 +9,7 @@ class GzFileReader { public: - bool gzGetLines(const std::string& filename, uint64_t& skip, uint64_t& top, + bool gzGetLines(const std::string& filename, uint64_t skip, uint64_t top, std::vector& logEntries, size_t& logCount) { gzFile logStream = gzopen(filename.c_str(), "r"); @@ -48,7 +48,7 @@ class GzFileReader << "Error Number: " << errNum; } - bool readFile(gzFile logStream, uint64_t& skip, uint64_t& top, + bool readFile(gzFile logStream, uint64_t skip, uint64_t top, std::vector& logEntries, size_t& logCount) { constexpr int bufferLimitSize = 1024; @@ -76,8 +76,8 @@ class GzFileReader return true; } - bool hostLogEntryParser(const std::string& bufferStr, uint64_t& skip, - uint64_t& top, std::vector& logEntries, + bool hostLogEntryParser(const std::string& bufferStr, uint64_t skip, + uint64_t top, std::vector& logEntries, size_t& logCount) { // Assume we have 8 files, and the max size of each file is -- cgit v1.2.3