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
diff --git a/redfish-core/include/gzfile.hpp b/redfish-core/include/gzfile.hpp
index 696b13c..a77c6ab 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 @@
<< "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 @@
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