Attn: Code cleanup based on CI build suggestions
Lessened the scope of some variables, made explicit a constructor,
changed a variable name that was shadowing a function name, removed some
unused code.
Signed-off-by: Ben Tyner <ben.tyner@ibm.com>
Change-Id: I430f6dece8b606318a0ffa476bf06f9a0060f72d
diff --git a/attn/pel/pel_minimal.hpp b/attn/pel/pel_minimal.hpp
index cde0ead..79c0c11 100644
--- a/attn/pel/pel_minimal.hpp
+++ b/attn/pel/pel_minimal.hpp
@@ -46,7 +46,7 @@
*
* @param[in] pelBuffer - buffer containing a raw PEL
*/
- PelMinimal(std::vector<uint8_t>& data);
+ explicit PelMinimal(std::vector<uint8_t>& data);
/**
* @brief Stream raw PEL data to buffer
diff --git a/attn/pel/private_header.cpp b/attn/pel/private_header.cpp
index 18d06d4..a610594 100644
--- a/attn/pel/private_header.cpp
+++ b/attn/pel/private_header.cpp
@@ -34,25 +34,5 @@
_sectionCount = sectionCount;
}
-/*
-Stream& operator<<(Stream& s, const CreatorVersion& cv)
-{
- for (size_t i = 0; i < sizeof(CreatorVersion); i++)
- {
- s << cv.version[i];
- }
- return s;
-}
-
-Stream& operator>>(Stream& s, CreatorVersion& cv)
-{
- for (size_t i = 0; i < sizeof(CreatorVersion); i++)
- {
- s >> cv.version[i];
- }
- return s;
-}
-*/
-
} // namespace pel
} // namespace attn
diff --git a/attn/pel/private_header.hpp b/attn/pel/private_header.hpp
index 3b80968..6d447ee 100644
--- a/attn/pel/private_header.hpp
+++ b/attn/pel/private_header.hpp
@@ -1,6 +1,5 @@
#pragma once
-//#include "bcd_time.hpp"
#include "pel_common.hpp"
#include "pel_section.hpp"
#include "stream.hpp"
@@ -10,17 +9,6 @@
namespace pel
{
-// creator version field type, init to null terminated
-// struct CreatorVersion
-//{
-// uint8_t version[8];
-
-// CreatorVersion()
-// {
-// memset(version, '\0', sizeof(version));
-// }
-//};
-
/**
* @class PrivateHeader
*
@@ -121,13 +109,11 @@
* @brief The creation time timestamp
*/
uint64_t _createTimestamp;
- // BCDTime _createTimestamp;
/**
* @brief The commit time timestamp
*/
uint64_t _commitTimestamp;
- // BCDTime _commitTimestamp;
/**
* @brief The creator ID field
@@ -171,21 +157,5 @@
uint32_t _id = 0;
};
-/**
- * @brief Stream insertion operator for the CreatorVersion
- *
- * @param[out] s - the stream
- * @param[in] cv - the CreatorVersion object
- */
-// Stream& operator<<(Stream& s, const CreatorVersion& cv);
-
-/**
- * @brief Stream extraction operator for the CreatorVersion
- *
- * @param[in] s - the stream
- * @param[out] cv - the CreatorVersion object
- */
-// Stream& operator>>(Stream& s, CreatorVersion& cv);
-
} // namespace pel
} // namespace attn