From ad7d8f183a09d7a9e5fa828b6aeb58aaab84abc7 Mon Sep 17 00:00:00 2001 From: acxz <17132214+acxz@users.noreply.github.com> Date: Mon, 14 Jun 2021 16:25:15 -0400 Subject: [PATCH] use size_t variable type --- gtsam_unstable/timing/timeShonanAveraging.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gtsam_unstable/timing/timeShonanAveraging.cpp b/gtsam_unstable/timing/timeShonanAveraging.cpp index d42635404b..e932b64007 100644 --- a/gtsam_unstable/timing/timeShonanAveraging.cpp +++ b/gtsam_unstable/timing/timeShonanAveraging.cpp @@ -52,7 +52,7 @@ void saveResult(string name, const Values& values) { myfile.open("shonan_result_of_" + name + ".dat"); size_t nrSO3 = values.count(); myfile << "#Type SO3 Number " << nrSO3 << "\n"; - for (int i = 0; i < nrSO3; ++i) { + for (size_t i = 0; i < nrSO3; ++i) { Matrix R = values.at(i).matrix(); // Check if the result of R.Transpose*R satisfy orthogonal constraint checkR(R); @@ -72,7 +72,7 @@ void saveG2oResult(string name, const Values& values, std::map poses ofstream myfile; myfile.open("shonan_result_of_" + name + ".g2o"); size_t nrSO3 = values.count(); - for (int i = 0; i < nrSO3; ++i) { + for (size_t i = 0; i < nrSO3; ++i) { Matrix R = values.at(i).matrix(); // Check if the result of R.Transpose*R satisfy orthogonal constraint checkR(R); @@ -92,7 +92,7 @@ void saveResultQuat(const Values& values) { ofstream myfile; myfile.open("shonan_result.dat"); size_t nrSOn = values.count(); - for (int i = 0; i < nrSOn; ++i) { + for (size_t i = 0; i < nrSOn; ++i) { GTSAM_PRINT(values.at(i)); Rot3 R = Rot3(values.at(i).matrix()); float x = R.toQuaternion().x();