"if (strlen(msg))" -> "if (msg[0])"
This commit is contained in:
parent
7af8b13ef7
commit
b761131fec
3 changed files with 3 additions and 3 deletions
|
|
@ -127,7 +127,7 @@ namespace Swig {
|
||||||
std::string swig_msg;
|
std::string swig_msg;
|
||||||
public:
|
public:
|
||||||
DirectorException(int code, const char *hdr, const char *msg TSRMLS_DC) : swig_msg(hdr) {
|
DirectorException(int code, const char *hdr, const char *msg TSRMLS_DC) : swig_msg(hdr) {
|
||||||
if (strlen(msg)) {
|
if (msg[0]) {
|
||||||
swig_msg += " ";
|
swig_msg += " ";
|
||||||
swig_msg += msg;
|
swig_msg += msg;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -179,7 +179,7 @@ namespace Swig {
|
||||||
public:
|
public:
|
||||||
DirectorException(PyObject *error, const char *hdr ="", const char *msg ="") : swig_msg(hdr) {
|
DirectorException(PyObject *error, const char *hdr ="", const char *msg ="") : swig_msg(hdr) {
|
||||||
SWIG_PYTHON_THREAD_BEGIN_BLOCK;
|
SWIG_PYTHON_THREAD_BEGIN_BLOCK;
|
||||||
if (strlen(msg)) {
|
if (msg[0]) {
|
||||||
swig_msg += " ";
|
swig_msg += " ";
|
||||||
swig_msg += msg;
|
swig_msg += msg;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,7 @@ namespace Swig {
|
||||||
}
|
}
|
||||||
|
|
||||||
DirectorException(VALUE error, const char *hdr, const char *msg ="") : swig_error(error), swig_msg(hdr) {
|
DirectorException(VALUE error, const char *hdr, const char *msg ="") : swig_error(error), swig_msg(hdr) {
|
||||||
if (strlen(msg)) {
|
if (msg[0]) {
|
||||||
swig_msg += " ";
|
swig_msg += " ";
|
||||||
swig_msg += msg;
|
swig_msg += msg;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue