Skip to content

Commit 08b6137

Browse files
author
Sylvain Garcia
committed
fix size_t not defined in gcc-12
- another alternative whould be to include <cstdlib>
1 parent 4c7e60e commit 08b6137

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/common/simulators/MainMeterSimulator.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ std::vector<unsigned int> MainMeterSimulator::getCurrents()
5252
for (auto& meter : m_child_meters)
5353
{
5454
std::vector<unsigned int> child_currents = meter->getCurrents();
55-
for (size_t i = 0; i < child_currents.size(); i++)
55+
for (std::size_t i = 0; i < child_currents.size(); i++)
5656
{
5757
currents[i] += child_currents[i];
5858
}
@@ -67,7 +67,7 @@ std::vector<unsigned int> MainMeterSimulator::getInstantPowers()
6767
for (auto& meter : m_child_meters)
6868
{
6969
std::vector<unsigned int> child_powers = meter->getInstantPowers();
70-
for (size_t i = 0; i < child_powers.size(); i++)
70+
for (std::size_t i = 0; i < child_powers.size(); i++)
7171
{
7272
powers[i] += child_powers[i];
7373
}

0 commit comments

Comments
 (0)