Fixed Matlab extension compilation

Added missing namespace qualifiers after removing
"using namespace std" in a previous commit.
This commit is contained in:
Ray Speth 2012-01-26 18:31:41 +00:00
parent 32afe97ebd
commit 1cdec7a851

View file

@ -23,13 +23,13 @@ inline char* getString(const mxArray* p) {
size_t m = mxGetM(p);
size_t n = mxGetN(p);
mwSize buflen = (mwSize) (m*n + 1);
string msg;
std::string msg;
if (m == 1) {
input_buf = (char*)mxCalloc(buflen, sizeof(char));
status = mxGetString(p, input_buf, buflen);
if(status != 0) {
msg = string(input_buf)
msg = std::string(input_buf)
+ "\nNot enough space. String is truncated.";
mexWarnMsgTxt(msg.c_str());
}