[m-rev.] diff: fix first_char(in, in, out) in MC++
Peter Ross
peter.ross at miscrit.be
Thu Jul 26 20:44:56 AEST 2001
Hi,
===================================================================
Estimated hours taken: 0.25
Branches: main
string.m:
Fix a bug in first_char(in, in, out) where we doing an extra incorrect
string comparison.
Index: string.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/string.m,v
retrieving revision 1.147
diff -u -r1.147 string.m
--- string.m 25 Jul 2001 16:04:50 -0000 1.147
+++ string.m 26 Jul 2001 09:47:25 -0000
@@ -2212,8 +2212,7 @@
[will_not_call_mercury, thread_safe], "{
MR_Integer len = Str->get_Length();
if (len > 0) {
- SUCCESS_INDICATOR = (First == Str->get_Chars(0) &&
- System::String::Compare(Str, 1, Rest, 0, len) == 0);
+ SUCCESS_INDICATOR = (First == Str->get_Chars(0));
Rest = (Str)->Substring(1);
} else {
SUCCESS_INDICATOR = FALSE;
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list