Commit Graph

16 Commits (680194deaf7a35caaa629abc16e886d71baff636)

Author SHA1 Message Date
Richard Linden aef2a527e5 BUILDFIX: double delete in instancetracker unit test 2013-10-21 10:32:19 -07:00
Richard Linden 4170ef8ecc fixed llinstancetracker unit test 2013-10-18 09:50:26 -07:00
Oz Linden ddd5659f81 merge changes for DRTVWR-294 2013-04-19 10:11:29 -04:00
Graham Madarasz bf6182daa8 Update Mac and Windows breakpad builds to latest 2013-03-29 07:50:08 -07:00
Don Kjer c06c35609c Updating linux build to gcc4.6 2012-10-11 00:09:04 +00:00
Nat Goodspeed 063edac43f Automated merge with file:///Users/nat/linden/viewer-leap-daggy 2012-02-27 14:48:39 -05:00
Nat Goodspeed 6f53796ccf Add LLInstanceTracker test for exception in subclass constructor.
We want to verify the sequence:
LLInstanceTracker constructor adds instance to underlying container
Subclass constructor throws exception
LLInstanceTracker destructor removes instance from underlying container.
2012-02-27 14:47:40 -05:00
Nat Goodspeed c0318d1bf9 Make LLInstanceTracker<T, T*>::getInstance(T*) validate passed T*.
For the T* specialization (no string, or whatever, key), the original
getInstance() method simply returned the passed-in T* value. It was defined,
as the comments noted, for completeness of the analogy with the keyed
LLInstanceTracker specialization.
It turns out, though, that getInstance(T*) can still be useful to ask whether
the T* you have in hand still references a valid T instance. Support that
usage.
2012-02-27 11:50:47 -05:00
Nat Goodspeed b4a1d339fc STORM-1541: Add LLInstanceTracker tests for active-iterator asserts.
The recent class-static LLInstanceTracker::instance_iter and key_iter
reference count is intended to guard against deleting an instance of an
LLInstanceTracker subclass during iteration. Add tests for that functionality.
2011-09-07 17:29:08 -04:00
Nat Goodspeed bf906ac926 Re-add 3 llinstancetracker tests disabled by changeset 1ead63777bf6.
Fix LLInstanceTracker::key_iter constructor param; accepting
InstanceMap::iterator by non-const reference relied on Microsoft extension
that accepts non-const reference to an rvalue. Given typical iterator
implementation, simply accept by value instead, which makes gcc happy too.
2011-08-24 09:08:42 -04:00
Richard Nelson 5c8f22c640 fix for gcc 2011-07-27 15:34:58 -07:00
Richard Nelson 75d2382dc3 fixed build 2011-07-26 18:54:07 -07:00
Richard Nelson df82fbffa2 removed last vestiges of llinstancetracerscopedguard 2011-07-26 14:35:54 -07:00
Oz Linden 06b0d72efa Change license from GPL to LGPL (version 2.1) 2010-08-13 07:24:57 -04:00
Tofu Linden a4d224ff93 EXT-5055 LLInstanceTracker promotes some dangerous patterns - detect them 2010-02-06 21:38:57 +00:00
Nat Goodspeed a97aebb84a Enhance LLInstanceTracker variants to be more uniform.
For both the (so far unused) generic KEY form and the KEY = T* form, provide
key_iter, beginKeys(), endKeys().
Change instance_iter so that when dereferenced, it gives you a T& rather than
a T*, to be more harmonious with a typical STL container. (You parameterize
LLInstanceTracker with T, not with T*.)
Fix existing usage in llfasttimer.cpp and lltimer.cpp to agree.
For the KEY = T* specialization, add T* getInstance(T*) so client isn't forced
to know which variant was used.
Add unit tests for uniformity of public operations on both variants.
2009-11-10 13:30:29 -05:00