aboutsummaryrefslogtreecommitdiff
path: root/src/functionmatches.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2011-01-20 18:21:03 +0000
committerMike Buland <eichlan@xagasoft.com>2011-01-20 18:21:03 +0000
commitc435c7daa9df1b08dc85132fcd1c154bea9b69e2 (patch)
tree5537f3c91a67b35c4c8aa918b708b7e4aad8f146 /src/functionmatches.cpp
parent59690513123de8904eef2a03fe7fcaaed98b1b7b (diff)
downloadbuild-c435c7daa9df1b08dc85132fcd1c154bea9b69e2.tar.gz
build-c435c7daa9df1b08dc85132fcd1c154bea9b69e2.tar.bz2
build-c435c7daa9df1b08dc85132fcd1c154bea9b69e2.tar.xz
build-c435c7daa9df1b08dc85132fcd1c154bea9b69e2.zip
Fixes to use libbu++ Bu::String
Diffstat (limited to 'src/functionmatches.cpp')
-rw-r--r--src/functionmatches.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/functionmatches.cpp b/src/functionmatches.cpp
index 5b96fa8..0f76316 100644
--- a/src/functionmatches.cpp
+++ b/src/functionmatches.cpp
@@ -14,14 +14,14 @@ FunctionMatches::~FunctionMatches()
14{ 14{
15} 15}
16 16
17Bu::FString FunctionMatches::getName() const 17Bu::String FunctionMatches::getName() const
18{ 18{
19 return "matches"; 19 return "matches";
20} 20}
21 21
22bool FunctionMatches::globcmp( const Bu::FString &sTxt, const Bu::FString &sMatches ) 22bool FunctionMatches::globcmp( const Bu::String &sTxt, const Bu::String &sMatches )
23{ 23{
24 Bu::FString::const_iterator t, g; 24 Bu::String::const_iterator t, g;
25 t = sTxt.begin(); 25 t = sTxt.begin();
26 g = sMatches.begin(); 26 g = sMatches.begin();
27 27
@@ -36,7 +36,7 @@ bool FunctionMatches::globcmp( const Bu::FString &sTxt, const Bu::FString &sMatc
36 return true; 36 return true;
37 // Now attempt to scan for the remainder as a matched set 37 // Now attempt to scan for the remainder as a matched set
38 { 38 {
39 Bu::FString::const_iterator tn = t+1, gn = g+1, gi=g+1; 39 Bu::String::const_iterator tn = t+1, gn = g+1, gi=g+1;
40 bool bFoundMatch = false; 40 bool bFoundMatch = false;
41 while( tn && gn ) 41 while( tn && gn )
42 { 42 {
@@ -87,7 +87,7 @@ bool FunctionMatches::globcmp( const Bu::FString &sTxt, const Bu::FString &sMatc
87 return true; 87 return true;
88} 88}
89 89
90bool FunctionMatches::matchlist( const Bu::FString &sTxt, VarList &lParams ) 90bool FunctionMatches::matchlist( const Bu::String &sTxt, VarList &lParams )
91{ 91{
92 for( VarList::iterator i = lParams.begin(); i; i++ ) 92 for( VarList::iterator i = lParams.begin(); i; i++ )
93 { 93 {
@@ -114,7 +114,7 @@ Variable FunctionMatches::call( Variable &input, VarList lParams )
114 { 114 {
115 case Variable::typeString: 115 case Variable::typeString:
116 { 116 {
117 Bu::FString sTxt = input.getString(); 117 Bu::String sTxt = input.getString();
118 return Variable( matchlist( sTxt, lParams ) ); 118 return Variable( matchlist( sTxt, lParams ) );
119 } 119 }
120 break; 120 break;
@@ -126,7 +126,7 @@ Variable FunctionMatches::call( Variable &input, VarList lParams )
126 { 126 {
127 if( (*i).getType() != Variable::typeString ) 127 if( (*i).getType() != Variable::typeString )
128 continue; 128 continue;
129 Bu::FString sTxt = (*i).getString(); 129 Bu::String sTxt = (*i).getString();
130 if( matchlist( sTxt, lParams ) ) 130 if( matchlist( sTxt, lParams ) )
131 vRet.append( *i ); 131 vRet.append( *i );
132 } 132 }