Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warning detected on Fedora25 ci: comparison between signed and un… #1335

Merged
merged 1 commit into from
Feb 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ int main(int argc, char **argv)
vec_img_data.reserve(g.getLastFrameIndex() * height * width);

std::vector<double> times;
int iter = 0;
size_t iter = 0;
while (!g.end()) {
g.acquire(I);
tracker.track(I);
Expand Down Expand Up @@ -175,14 +175,14 @@ int main(int argc, char **argv)
tracker.getModelForDisplay(mapOfModels, mapOfW, mapOfH, mapOfcMos, mapOfCams);

std::vector<std::vector<double>> model = mapOfModels[camera_name];
const std::string model_iter = toString("model_%06d", iter);
const std::string model_iter = toString("model_%06zu", iter);
const std::string model_iter_sz = model_iter + "_sz";
const size_t model_size = model.size();
visp::cnpy::npz_save(npz_filename, model_iter_sz, &model_size, { 1 }, "a");

for (size_t i = 0; i < model.size(); i++) {
char buffer[100];
int res = snprintf(buffer, 100, "model_%06d_%06zu", iter, i);
int res = snprintf(buffer, 100, "model_%06zu_%06zu", iter, i);
if (res > 0 && res < 100) {
const std::string model_iter_data = buffer;
std::vector<double> &vec_line = model[i];
Expand Down
Loading