summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2017-01-17 12:18:56 +0100
committerWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2017-01-17 12:18:56 +0100
commitdb5318f30c28d37f877325f587485d3122e784df (patch)
treee63d4920ff094a1707f024025cfdd4ef1d2ccfbb
parent8aa72ecc013d0e5fdbbba98850aba1d88417df91 (diff)
downloadastra-db5318f30c28d37f877325f587485d3122e784df.tar.gz
astra-db5318f30c28d37f877325f587485d3122e784df.tar.bz2
astra-db5318f30c28d37f877325f587485d3122e784df.tar.xz
astra-db5318f30c28d37f877325f587485d3122e784df.zip
Fix warnings
-rw-r--r--matlab/mex/mexHelpFunctions.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/matlab/mex/mexHelpFunctions.cpp b/matlab/mex/mexHelpFunctions.cpp
index 8d8f484..7cab248 100644
--- a/matlab/mex/mexHelpFunctions.cpp
+++ b/matlab/mex/mexHelpFunctions.cpp
@@ -360,18 +360,18 @@ mxArray* stringToMxArray(std::string input)
StringUtil::splitString(col_strings, row_strings[0], ",");
// get dimensions
- int rows = row_strings.size();
- int cols = col_strings.size();
+ size_t rows = row_strings.size();
+ size_t cols = col_strings.size();
// init matrix
mxArray* pMatrix = mxCreateDoubleMatrix(rows, cols, mxREAL);
double* out = mxGetPr(pMatrix);
// loop elements
- for (unsigned int row = 0; row < rows; row++) {
+ for (size_t row = 0; row < rows; row++) {
StringUtil::splitString(col_strings, row_strings[row], ",");
// check size
- for (unsigned int col = 0; col < col_strings.size(); col++) {
+ for (size_t col = 0; col < col_strings.size(); col++) {
out[col*rows + row] = StringUtil::stringToFloat(col_strings[col]);
}
}
@@ -390,7 +390,7 @@ mxArray* stringToMxArray(std::string input)
double* out = mxGetPr(pVector);
// loop elements
- for (unsigned int i = 0; i < items.size(); i++) {
+ for (size_t i = 0; i < items.size(); i++) {
out[i] = StringUtil::stringToFloat(items[i]);
}
return pVector;