Update of /cvsroot/mahogany/M/src/classes
In directory usw-pr-cvs1:/tmp/cvs-serv21049/src/classes
Modified Files:
MFilter.cpp
Log Message:
don't generate extra closing parentheses for the criteria which don't need them (bug
638)
Index: MFilter.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/classes/MFilter.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -b -u -2 -r1.18 -r1.19
--- MFilter.cpp 5 Mar 2002 18:15:04 -0000 1.18
+++ MFilter.cpp 29 Apr 2002 15:52:35 -0000 1.19
@@ -130,4 +130,6 @@
const char * ORC_T_Names[] =
{
+ // NB: if the string is terminated with a '(' a matching ')' will be
+ // automatically added when constructing the filter expression
"1", // ORC_T_Always = 0,
"matchi(", // ORC_T_Match,
@@ -231,4 +233,5 @@
bool needsArgument = (ORC_T_Flags[m_Test] & ORC_F_NeedsArg) != 0;
program << ORC_T_Names[m_Test];
+ bool needsClosingParen = program.Last() == '(';
if(needsTarget)
{
@@ -236,5 +239,8 @@
program << ORC_W_Names[ m_Target ];
else
- { ASSERT_MSG(0,"This must not happen!"); return ""; }
+ {
+ FAIL_MSG("This must not happen!");
+ return "";
+ }
}
if(needsTarget && needsArgument)
@@ -246,5 +252,5 @@
program << '"' << strutil_escapeString(m_Argument) << '"';
}
- if(needsTarget || needsArgument)
+ if ( needsClosingParen )
program << ')'; // end of function call
program << ')';
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates