Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - raven

Pages: [1]
1
NGUI 3 Support / Re: about BetterList.Contains
« on: February 23, 2014, 05:01:54 AM »
Thanks Nicki, yes basically I want the != check you added but I also want to know the reason why NGUI choose not adding it.

2
NGUI 3 Support / Re: about BetterList.Contains
« on: February 23, 2014, 12:49:17 AM »
I checked the latest version, the code is exactly the same.

It might because the format check of the forum removing some characters. the first check is for the buffer itself.
The problem here is that i'th item in the buffer isn't null checked.

Best,

Raven

3
NGUI 3 Support / about BetterList.Contains
« on: February 18, 2014, 03:12:24 AM »
We are on NGUI2.6.1, to me the following code is problematic:
        public bool Contains (T item)
   {
      if (buffer == null) return false;
      for (int i = 0; i < size; ++i) if (buffer.Equals(item)) return true;
      return false;
   }

It assumes that buffer is not null but what if buffer is destroyed outside?
In this case, we will want to figure out why we destroy materials when there is reference to them. But at the same time, we don't want it crash the app for release build.

Anyone has comments on this?

Best,

Raven

Pages: [1]