fix to have an happy CI

This commit is contained in:
Gwenhael Goavec-Merou 2025-03-18 23:02:11 +01:00
parent 414a7259f0
commit 4c4f48ea93
4 changed files with 5 additions and 4 deletions

View File

@ -486,7 +486,7 @@ void Altera::max10_program(unsigned int offset)
if (_flash_sectors.size() > 0) {
const std::vector<std::string> sectors = splitString(_flash_sectors, ',');
update_sectors = 0;
for (const auto sector: sectors) {
for (const auto &sector: sectors) {
if (sector == "UFM1")
update_sectors |= (1 << 0);
else if (sector == "UFM0")

View File

@ -6,8 +6,9 @@
#include "common.hpp"
#include <string>
#include <cstdlib>
#include <string>
#include <vector>
/*!
* \brief return shell environment variable value
@ -31,7 +32,7 @@ const std::vector<std::string> splitString(const std::string& in,
std::vector<std::string> tokens;
size_t start = 0, end = 0;
while ((end = in.find(',', start)) != std::string::npos) {
while ((end = in.find(delim, start)) != std::string::npos) {
tokens.push_back(in.substr(start, end - start));
start = end + 1;
}

View File

@ -7,6 +7,7 @@
#define SRC_COMMON_HPP_
#include <string>
#include <vector>
/*!
* \brief return shell environment variable value

View File

@ -142,7 +142,6 @@ int main(int argc, char **argv)
printError("Error in parse arg step");
return EXIT_FAILURE;
}
printf("sectors: %s\n", args.flash_sector.c_str());
if (args.is_list_command) {
displaySupported(args);