<feed xmlns='http://www.w3.org/2005/Atom'>
<title>viewer.git/indra/test/llevents_tut.cpp, branch 26.1.1</title>
<subtitle>Megapahit's fork of the Second Life viewer.
</subtitle>
<id>https://megapahit.org/viewer.git/atom?h=26.1.1</id>
<link rel='self' href='https://megapahit.org/viewer.git/atom?h=26.1.1'/>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/'/>
<updated>2025-12-01T10:48:07Z</updated>
<entry>
<title>#5078 Replace boost::assign usage with modern c++ brace initialization</title>
<updated>2025-12-01T10:48:07Z</updated>
<author>
<name>Rye</name>
<email>rye@alchemyviewer.org</email>
</author>
<published>2025-12-01T10:48:07Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=416ab835aa4ba8e13d17e8b8ecb434aead3045de'/>
<id>urn:sha1:416ab835aa4ba8e13d17e8b8ecb434aead3045de</id>
<content type='text'>
Signed-off-by: Rye &lt;rye@alchemyviewer.org&gt;</content>
</entry>
<entry>
<title>Clean up boost includes and remove compiler warning pragma for unreachable code in PCH (#2361)</title>
<updated>2024-08-20T15:41:48Z</updated>
<author>
<name>Ansariel Hiller</name>
<email>Ansariel@users.noreply.github.com</email>
</author>
<published>2024-08-20T15:41:48Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=9f7dd0177201fe080c287144b99a70125be1fb2b'/>
<id>urn:sha1:9f7dd0177201fe080c287144b99a70125be1fb2b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>#824 Process source files in bulk: replace tabs with spaces, convert CRLF to LF, and trim trailing whitespaces as needed</title>
<updated>2024-04-29T04:56:09Z</updated>
<author>
<name>Andrey Lihatskiy</name>
<email>alihatskiy@productengine.com</email>
</author>
<published>2024-04-29T04:43:28Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=1b68f71348ecf3983b76b40d7940da8377f049b7'/>
<id>urn:sha1:1b68f71348ecf3983b76b40d7940da8377f049b7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>replace boost library to standard</title>
<updated>2024-01-08T21:29:21Z</updated>
<author>
<name>AiraYumi</name>
<email>aira.youme@airanyumi.net</email>
</author>
<published>2024-01-06T14:29:06Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=7c8907522fe6600918dacc15ee138ca72b2cf35e'/>
<id>urn:sha1:7c8907522fe6600918dacc15ee138ca72b2cf35e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>DRTVWR-476: Kill LLEventQueue, per-frame LLEventPump::flush() calls.</title>
<updated>2020-03-25T22:58:16Z</updated>
<author>
<name>Nat Goodspeed</name>
<email>nat@lindenlab.com</email>
</author>
<published>2019-10-17T17:26:51Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=79a3e391d3c992925230ff01551747e7edccb0ca'/>
<id>urn:sha1:79a3e391d3c992925230ff01551747e7edccb0ca</id>
<content type='text'>
No one uses LLEventQueue to defer posted events until the next mainloop tick
-- and with LLCoros moving to Boost.Fiber, cross-coroutine event posting works
that way anyway, making LLEventQueue pretty unnecessary.

The static RegisterFlush instance in llevents.cpp was used to call
LLEventPumps::flush() once per mainloop tick, which in turn called flush() on
every registered LLEventPump. But the only reason for that mechanism was to
support LLEventQueue. In fact, when LLEventMailDrop overrode its flush()
method for something quite different, it was startling to find that the new
flush() override was being called once per frame -- which caused at least one
fairly mysterious bug. Remove RegisterFlush. Both LLEventPumps::flush() and
LLEventPump::flush() remain for now, though intended usage is unclear.

Eliminating LLEventQueue means we must at least repurpose
LLEventPumps::mQueueNames, a map intended to make LLEventPumps::obtain()
instantiate an LLEventQueue rather than the default LLEventPump. Replace it
with mFactories, a map from desired instance name to a callable returning
LLEventPump*. New map initialization syntax plus lambda support allows us to
populate that map at compile time with little lambdas returning the correct
subclass instance.

Similarly, LLLeapListener::newpump() used to check the ["type"] entry in the
LLSD request specifically for "LLEventQueue". Introduce another such map in
llleaplistener.cpp for potential future extensibility.

Eliminate the LLEventQueue-specific test.
</content>
</entry>
<entry>
<title>DRTVWR-476: Remove special case for listen(boost::bind(weak_ptr)).</title>
<updated>2020-03-25T22:52:11Z</updated>
<author>
<name>Nat Goodspeed</name>
<email>nat@lindenlab.com</email>
</author>
<published>2019-10-16T03:06:04Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=afaad3cef749e926cb63b6aed0c14f25d3495d55'/>
<id>urn:sha1:afaad3cef749e926cb63b6aed0c14f25d3495d55</id>
<content type='text'>
LLEventDetail::visit_and_connect() promised special treatment for the
specific case when an LLEventPump::listen() listener was composed of (possibly
nested) boost::bind() objects storing boost::weak_ptr values -- specifically
boost::bind() rather than std::bind or lambdas, specifically boost::weak_ptr
rather than std::weak_ptr.

Outside of self-tests, it does not appear that anyone actually uses that
support.

There is good reason not to: it's a silent side effect of a complicated
compile-time inspection that could be silently derailed by use of std::bind()
or a lambda or a std::weak_ptr. Can you be sure you've engaged that promise?
How?

A more robust guarantee can be achieved by storing an LLTempBoundConnection in
the transient object itself. When the object is destroyed, the listener is
disconnected. Normal C++ rules around object destruction guarantee it. This
idiom is widely used.

There are a couple good reasons to remove the visit_and_connect() machinery:

* boost::bind() and boost::weak_ptr do not constitute the wave of the future.
  Preferring those constructs to lambdas and std::weak_ptr penalizes new code,
  whether by silently failing or by discouraging use of modern idioms.
* The visit_and_connect() machinery was always complicated, and apparently
  never very robust. Most of its promised features have been commented out
  over the years. Making the code base simpler, clearer and more maintainable
  is always a useful effect.

LLEventDetail::visit_and_connect() was also used by the four
LLNotificationChannelBase::connectMumble() methods. Streamline those as well.

Of course, remove related test code.
</content>
</entry>
<entry>
<title>DRTVWR-476: Remove llwrap(), LLListenerWrapper[Base] and support.</title>
<updated>2020-03-25T22:52:11Z</updated>
<author>
<name>Nat Goodspeed</name>
<email>nat@lindenlab.com</email>
</author>
<published>2019-10-15T20:16:55Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=18e2b9ca8b5d4be0f1b92b464421693678cca0a0'/>
<id>urn:sha1:18e2b9ca8b5d4be0f1b92b464421693678cca0a0</id>
<content type='text'>
The only usage of any of this was in test code.
</content>
</entry>
<entry>
<title>DRTVWR-493: Introduce test catch_what(), catch_llerrs() functions.</title>
<updated>2019-08-11T00:33:59Z</updated>
<author>
<name>Nat Goodspeed</name>
<email>nat@lindenlab.com</email>
</author>
<published>2019-08-11T00:33:59Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=adb3f447b33e42bdb6e4a5a1ac79eebd862dafb4'/>
<id>urn:sha1:adb3f447b33e42bdb6e4a5a1ac79eebd862dafb4</id>
<content type='text'>
Use them in place of awkward try/catch test boilerplate.
</content>
</entry>
<entry>
<title>remove execute permission from many files that should not have it</title>
<updated>2015-11-10T14:48:56Z</updated>
<author>
<name>Oz Linden</name>
<email>oz@lindenlab.com</email>
</author>
<published>2015-11-10T14:48:56Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=c8726aba303bcf1207b730a344536e25491420bc'/>
<id>urn:sha1:c8726aba303bcf1207b730a344536e25491420bc</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix Xcode 6 compile errors relating to tut::ensure_equals() overloads.</title>
<updated>2014-10-23T15:44:42Z</updated>
<author>
<name>Nat Goodspeed</name>
<email>nat@lindenlab.com</email>
</author>
<published>2014-10-23T15:44:42Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=642c334efa2dbd0bafca5b0dbb11a986cd5ab4a9'/>
<id>urn:sha1:642c334efa2dbd0bafca5b0dbb11a986cd5ab4a9</id>
<content type='text'>
lltut.h declares a number of ensure_equals() overloads for various data types,
notably the types supported by LLSD. We expect these to be called by tut code.
But the tut code in question is in a template in tut.hpp -- which was
#included BEFORE the overloads were declared. Previous C++ compilers have
evidently made multiple passes, collecting the relevant overloads before
attempting to compile the template bodies. clang does not, complaining that
the overloads must be declared before the tut.hpp template code that
references them. Reordering parts of lltut.h seems to address that problem.
For similar reasons, test programs that use StringVec.h and its operator&lt;&lt;()
must #include StringVec.h before lltut.h.
Add ensure_equals(const std::string&amp;, const LLSD::Binary&amp;, const LLSD::Binary&amp;)
overload. The sloppy mix of (const char*, ...) and (const std::string&amp;, ...)
overloads bothers me, since for many of those ... types we seem to have to
duplicate them.
</content>
</entry>
</feed>
