diff --git a/tutorial/tracking/model-based/generic/tutorial-mb-generic-tracker-save.cpp b/tutorial/tracking/model-based/generic/tutorial-mb-generic-tracker-save.cpp index efd53106c7..4fac889d96 100644 --- a/tutorial/tracking/model-based/generic/tutorial-mb-generic-tracker-save.cpp +++ b/tutorial/tracking/model-based/generic/tutorial-mb-generic-tracker-save.cpp @@ -138,7 +138,7 @@ int main(int argc, char **argv) vec_img_data.reserve(g.getLastFrameIndex() * height * width); std::vector times; - int iter = 0; + size_t iter = 0; while (!g.end()) { g.acquire(I); tracker.track(I); @@ -175,14 +175,14 @@ int main(int argc, char **argv) tracker.getModelForDisplay(mapOfModels, mapOfW, mapOfH, mapOfcMos, mapOfCams); std::vector> 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 &vec_line = model[i];