File tree Expand file tree Collapse file tree 4 files changed +8
-20
lines changed Expand file tree Collapse file tree 4 files changed +8
-20
lines changed Original file line number Diff line number Diff line change @@ -70,11 +70,8 @@ class MexFunction : public matlab::mex::Function {
7070 matlabPtr->feval (u" error" , 0 ,
7171 std::vector<matlab::data::Array>({ factory.createScalar (" One input required" ) }));
7272 }
73- if (inputs[0 ].getType () != matlab::data::ArrayType::MATLAB_STRING) {
74- matlabPtr->feval (u" error" , 0 ,
75- std::vector<matlab::data::Array>({ factory.createScalar (" Input must be a string" ) }));
76- }
77- if (inputs[0 ].getNumberOfElements () != 1 ) {
73+ if (inputs[0 ].getType () != matlab::data::ArrayType::MATLAB_STRING ||
74+ inputs[0 ].getNumberOfElements () != 1 ) {
7875 matlabPtr->feval (u" error" , 0 ,
7976 std::vector<matlab::data::Array>({ factory.createScalar (" Input must be a scalar string" ) }));
8077 }
Original file line number Diff line number Diff line change @@ -52,11 +52,8 @@ class MexFunction : public matlab::mex::Function {
5252 matlabPtr->feval (u" error" , 0 ,
5353 std::vector<matlab::data::Array>({ factory.createScalar (" One input required" ) }));
5454 }
55- if (inputs[0 ].getType () != matlab::data::ArrayType::MATLAB_STRING) {
56- matlabPtr->feval (u" error" , 0 ,
57- std::vector<matlab::data::Array>({ factory.createScalar (" Input must be a string" ) }));
58- }
59- if (inputs[0 ].getNumberOfElements () != 1 ) {
55+ if (inputs[0 ].getType () != matlab::data::ArrayType::MATLAB_STRING ||
56+ inputs[0 ].getNumberOfElements () != 1 ) {
6057 matlabPtr->feval (u" error" , 0 ,
6158 std::vector<matlab::data::Array>({ factory.createScalar (" Input must be a scalar string" ) }));
6259 }
Original file line number Diff line number Diff line change @@ -71,11 +71,8 @@ class MexFunction : public matlab::mex::Function {
7171 matlabPtr->feval (u" error" , 0 ,
7272 std::vector<matlab::data::Array>({ factory.createScalar (" Four inputs required" ) }));
7373 }
74- if (inputs[0 ].getType () != matlab::data::ArrayType::MATLAB_STRING) {
75- matlabPtr->feval (u" error" , 0 ,
76- std::vector<matlab::data::Array>({ factory.createScalar (" Input must be a string" ) }));
77- }
78- if (inputs[0 ].getNumberOfElements () != 1 ) {
74+ if (inputs[0 ].getType () != matlab::data::ArrayType::MATLAB_STRING ||
75+ inputs[0 ].getNumberOfElements () != 1 ) {
7976 matlabPtr->feval (u" error" , 0 ,
8077 std::vector<matlab::data::Array>({ factory.createScalar (" Input must be a scalar string" ) }));
8178 }
Original file line number Diff line number Diff line change @@ -27,11 +27,8 @@ class MexFunction : public matlab::mex::Function {
2727 matlabPtr->feval (u" error" , 0 ,
2828 std::vector<matlab::data::Array>({ factory.createScalar (" One input required" ) }));
2929 }
30- if (inputs[0 ].getType () != matlab::data::ArrayType::MATLAB_STRING) {
31- matlabPtr->feval (u" error" , 0 ,
32- std::vector<matlab::data::Array>({ factory.createScalar (" Input must be a string" ) }));
33- }
34- if (inputs[0 ].getNumberOfElements () != 1 ) {
30+ if (inputs[0 ].getType () != matlab::data::ArrayType::MATLAB_STRING ||
31+ inputs[0 ].getNumberOfElements () != 1 ) {
3532 matlabPtr->feval (u" error" , 0 ,
3633 std::vector<matlab::data::Array>({ factory.createScalar (" Input must be a scalar string" ) }));
3734 }
You can’t perform that action at this time.
0 commit comments