On Aug 2, 1:22 pm, Mark Murphy <[email protected]> wrote:
> Since your short-term goal is a compile, versus a run, try commenting
> out some of the stuff that seems strange, to see if you this file past
> the problem. The biggest thing in the affected method that leaps out at
> me is:
>
> > // The string is dodgy. Find the first valid char
> > firstHash = firstHash == -1?firstHash =
> > Integer.MAX_VALUE:firstHash;
> > firstZero = firstZero == -1?firstZero =
> > Integer.MAX_VALUE:firstZero;
Oh gosh! No kidding. I didn't notice that. The first part that is
relatively ugly, although not strictly illegal, is the unnecessary
absence of parentheses. More to the point, there is a completely
redundant assignment in the middle of the ternary assignment. I
changed it to the following:
firstHash = firstHash == -1?Integer.MAX_VALUE:firstHash;
firstZero = firstZero == -1?Integer.MAX_VALUE:firstZero;
...leaving the absent parens but patching the assignment. It built!
I haven't transferred it from the sandbox project to my primary
project, but this is good news.
Thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---