diff options
author | Nan Zhou <nanzhoumails@gmail.com> | 2022-04-06 21:07:27 +0300 |
---|---|---|
committer | Nan Zhou <nanzhoumails@gmail.com> | 2022-04-07 20:52:53 +0300 |
commit | 9739de9a62a9ae8173fff748268eecc73d559f39 (patch) | |
tree | e0e5b63db72e9d0cd8721207c4678ead48edfc36 /redfish-core/include | |
parent | 83c835fb7e9efa3a0142981b0fbfd4b3c37134b2 (diff) | |
download | bmcweb-9739de9a62a9ae8173fff748268eecc73d559f39.tar.xz |
hostlogger service: don't reference integerals
Copying integerals is cheap, and generally is cheaper than copying
references.
Tested: compiles.
Signed-off-by: Nan Zhou <nanzhoumails@gmail.com>
Change-Id: I5cb08445d6bc06ed1d0c86c27ca1db1bf4cce316
Diffstat (limited to 'redfish-core/include')
-rw-r--r-- | redfish-core/include/gzfile.hpp | 8 |
1 files changed, 4 insertions, 4 deletions
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<std::string>& 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<std::string>& 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<std::string>& logEntries, + bool hostLogEntryParser(const std::string& bufferStr, uint64_t skip, + uint64_t top, std::vector<std::string>& logEntries, size_t& logCount) { // Assume we have 8 files, and the max size of each file is |