diff options
author | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2015-03-01 17:21:04 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2015-03-01 18:58:43 +0100 |
commit | d7318352667dc45794072c6a853a882544f02671 (patch) | |
tree | dd667a579747a44f6f24f72c28e26374bd0272d9 /hwpfilter | |
parent | ff8b9c4e590ff6189b5d7446814a398ab513bd0c (diff) |
more efficient check for empty strings
Change-Id: Ibc2f7412b6bf8ef75f93d649812836c01224e43f
Diffstat (limited to 'hwpfilter')
-rw-r--r-- | hwpfilter/source/formula.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hwpfilter/source/formula.cxx b/hwpfilter/source/formula.cxx index ba29996d3723..c29cbee12475 100644 --- a/hwpfilter/source/formula.cxx +++ b/hwpfilter/source/formula.cxx @@ -625,7 +625,7 @@ int Formula::parse() break; } // fprintf(stderr,"\n\n[RESULT]\n[%s]\n",a.c_str()); - if( strlen(buf) > 0 ) + if( buf[0] != '\0' ) res = mainParse( a.c_str() ); else res = 0L; @@ -673,7 +673,7 @@ void Formula::trim() else break; } - if( strlen(buf) > 0 ) + if( buf[0] != '\0' ) strcpy(eq, buf); else eq = 0L; |