summaryrefslogtreecommitdiffstats
path: root/matlab/mex/mexHelpFunctions.cpp
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <wjp@usecode.org>2016-01-18 17:47:53 +0100
committerWillem Jan Palenstijn <wjp@usecode.org>2016-01-18 17:47:53 +0100
commit530aa4f96e9d0fe40ccd0bb9ae1363792a49467c (patch)
tree41ea934e76ad38f221a38469c6add9152f3a0884 /matlab/mex/mexHelpFunctions.cpp
parent34bab2b0caa6ee955d5d2f7882a6cd36cf142536 (diff)
parentfc86917da1a175c04e9bd2e5f0bedb0a48a81c26 (diff)
downloadastra-530aa4f96e9d0fe40ccd0bb9ae1363792a49467c.tar.gz
astra-530aa4f96e9d0fe40ccd0bb9ae1363792a49467c.tar.bz2
astra-530aa4f96e9d0fe40ccd0bb9ae1363792a49467c.tar.xz
astra-530aa4f96e9d0fe40ccd0bb9ae1363792a49467c.zip
Merge pull request #105 from wjp/strings
Replace boost::lexical_cast by stringstreams
Diffstat (limited to 'matlab/mex/mexHelpFunctions.cpp')
-rw-r--r--matlab/mex/mexHelpFunctions.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/matlab/mex/mexHelpFunctions.cpp b/matlab/mex/mexHelpFunctions.cpp
index 58e84d2..13c4ade 100644
--- a/matlab/mex/mexHelpFunctions.cpp
+++ b/matlab/mex/mexHelpFunctions.cpp
@@ -31,9 +31,9 @@ $Id$
* \brief Contains some functions for interfacing matlab with c data structures
*/
#include "mexHelpFunctions.h"
+#include "astra/Utilities.h"
#include <algorithm>
-#include <boost/lexical_cast.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/algorithm/string/split.hpp>
#include <boost/algorithm/string/classification.hpp>
@@ -58,7 +58,7 @@ string mexToString(const mxArray* pInput)
// is scalar?
if (mxIsNumeric(pInput) && mxGetM(pInput)*mxGetN(pInput) == 1) {
- return boost::lexical_cast<string>(mxGetScalar(pInput));
+ return StringUtil::doubleToString(mxGetScalar(pInput));
}
return "";
@@ -378,7 +378,7 @@ mxArray* stringToMxArray(std::string input)
boost::split(col_strings, row_strings[row], boost::is_any_of(","));
// check size
for (unsigned int col = 0; col < col_strings.size(); col++) {
- out[col*rows + row] = boost::lexical_cast<float32>(col_strings[col]);
+ out[col*rows + row] = StringUtil::stringToFloat(col_strings[col]);
}
}
return pMatrix;
@@ -397,7 +397,7 @@ mxArray* stringToMxArray(std::string input)
// loop elements
for (unsigned int i = 0; i < items.size(); i++) {
- out[i] = boost::lexical_cast<float32>(items[i]);
+ out[i] = StringUtil::stringToFloat(items[i]);
}
return pVector;
}