prefer prefix operators for non-primitive types
cppcheck recommended changes:
[src/FruDevice.cpp:639]
[src/EntityManager.cpp:349]
[src/EntityManager.cpp:502]
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Iaae360c4613d959094b7d05888fbc289484d17fc
diff --git a/src/EntityManager.cpp b/src/EntityManager.cpp
index 2f70483..b177119 100644
--- a/src/EntityManager.cpp
+++ b/src/EntityManager.cpp
@@ -346,7 +346,7 @@
cmp_str>::const_iterator probeType;
for (probeType = PROBE_TYPES.begin(); probeType != PROBE_TYPES.end();
- probeType++)
+ ++probeType)
{
if (probe.find(probeType->first) != std::string::npos)
{
@@ -499,7 +499,7 @@
boost::container::flat_map<const char*, probe_type_codes,
cmp_str>::const_iterator probeType;
for (probeType = PROBE_TYPES.begin();
- probeType != PROBE_TYPES.end(); probeType++)
+ probeType != PROBE_TYPES.end(); ++probeType)
{
if (probe.find(probeType->first) != std::string::npos)
{
diff --git a/src/FruDevice.cpp b/src/FruDevice.cpp
index f7be420..4d5486d 100644
--- a/src/FruDevice.cpp
+++ b/src/FruDevice.cpp
@@ -723,7 +723,7 @@
for (const std::string& area : FRU_AREAS)
{
- fruAreaOffsetField++;
+ ++fruAreaOffsetField;
if (fruAreaOffsetField >= fruBytes.end())
{
return false;