summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-01-10 12:39:45 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-01-10 17:11:49 +0100
commit6eeee04bad507a1194bac9709ce4f00322762477 (patch)
tree7f6ab6d935b745c9ba0e2811a3bb427f29deaff9 /tools
parentfd30e4a17a0dada462ae6024e6b21459418cba48 (diff)
WildCard::ImpMatch should return bool
Change-Id: Ib851cbe072bca0d594440cc28164e112d0fe37cb
Diffstat (limited to 'tools')
-rw-r--r--tools/source/fsys/wldcrd.cxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/tools/source/fsys/wldcrd.cxx b/tools/source/fsys/wldcrd.cxx
index e7311eab38c2..66425bc910e4 100644
--- a/tools/source/fsys/wldcrd.cxx
+++ b/tools/source/fsys/wldcrd.cxx
@@ -21,13 +21,11 @@
/** Tests, whether a wildcard in pWild will match for pStr.
*
- * If they match, return 1, otherwise 0.
- *
* '*' in pWild means n chars for n > 0.
* '?' in pWild mean match exactly one character.
*
*/
-sal_uInt16 WildCard::ImpMatch( const char *pWild, const char *pStr ) const
+bool WildCard::ImpMatch( const char *pWild, const char *pStr ) const
{
int pos=0;
int flag=0;
@@ -38,7 +36,7 @@ sal_uInt16 WildCard::ImpMatch( const char *pWild, const char *pStr ) const
{
case '?':
if ( *pStr == '\0' )
- return 0;
+ return false;
break;
default:
@@ -46,7 +44,7 @@ sal_uInt16 WildCard::ImpMatch( const char *pWild, const char *pStr ) const
pWild++;
if ( *pWild != *pStr )
if ( !pos )
- return 0;
+ return false;
else
pWild += pos;
else
@@ -56,7 +54,7 @@ sal_uInt16 WildCard::ImpMatch( const char *pWild, const char *pStr ) const
while ( *pWild == '*' )
pWild++;
if ( *pWild == '\0' )
- return 1;
+ return true;
flag = 1;
pos = 0;
if ( *pStr == '\0' )