Re: Re: Bug in UStr find and Replace
Guy Rouillier <[email protected]> Fri, 10 Mar 2006 18:44:46 -0500
| Newsgroups | gmane.comp.version-control.cvs.gui.devel |
|---|---|
| Message-ID | <[email protected]> |
kaczoroj wrote:
> Guy,
>
>> I like the idea of using a constant. Would you suggest defining
>> it within UStr itself, so that to use it from outside the class
>> you would say something like UStr::NOT_FOUND?
>
> Make it UStr::npos for similarity with std::basic_string::npos. It
> will make it more standard-look-alike ;)
>
> Note that there is also rfind to be fixed accordingly. To make sure
> that we find all parts in the code just change name to Find() and
> ReverseFind() and let the compiler find it for you. Since it's a
> critical change it's better to break compilation and make sure all
> places using the code are reviewed. We can make it back later on when
> sorting out string classes.
Ok, I'll make these changes this weekend to the branch I'm working on. I
prefer RFind over ReverseFind, seems more parallel to change find ->
Find and rfind -> RFind. Would you like me to make the same changes to
the main trunk at the same time? Should I create a bug report so people
know that the next time they check things out from CVS, their build
won't work? I'll make the necessary changes to the branch I'm working
on, but I don't expect that to get merged back in for quite awhile.
--
Guy Rouillier
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/cvsgui-dev/
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/