examples: Initialize arrays directly with 0

This commit is contained in:
Eduardo Almeida
2023-04-29 17:52:29 +01:00
parent 9b473e3333
commit 480ccccfb3
4 changed files with 8 additions and 20 deletions

View File

@@ -244,11 +244,8 @@ main(int argc, char* argv[])
"AGGR-MU-BAR)");
}
double prevThroughput[12];
for (uint32_t l = 0; l < 12; l++)
{
prevThroughput[l] = 0;
}
double prevThroughput[12] = {0};
std::cout << "MCS value"
<< "\t\t"
<< "Channel width"

View File

@@ -167,11 +167,8 @@ main(int argc, char* argv[])
phyModel = "Spectrum";
}
double prevThroughput[12];
for (uint32_t l = 0; l < 12; l++)
{
prevThroughput[l] = 0;
}
double prevThroughput[12] = {0};
std::cout << "MCS value"
<< "\t\t"
<< "Channel width"

View File

@@ -96,11 +96,8 @@ main(int argc, char* argv[])
Config::SetDefault("ns3::WifiRemoteStationManager::RtsCtsThreshold", StringValue("0"));
}
double prevThroughput[8];
for (uint32_t l = 0; l < 8; l++)
{
prevThroughput[l] = 0;
}
double prevThroughput[8] = {0};
std::cout << "MCS value"
<< "\t\t"
<< "Channel width"

View File

@@ -90,11 +90,8 @@ main(int argc, char* argv[])
Config::SetDefault("ns3::WifiRemoteStationManager::RtsCtsThreshold", StringValue("0"));
}
double prevThroughput[8];
for (uint32_t l = 0; l < 8; l++)
{
prevThroughput[l] = 0;
}
double prevThroughput[8] = {0};
std::cout << "MCS value"
<< "\t\t"
<< "Channel width"