summaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2021-05-12 12:02:57 -0400
committerNat Goodspeed <nat@lindenlab.com>2021-05-12 12:02:57 -0400
commit5b96ee0e10923a00ddb3836d4dc3c5f912ca4330 (patch)
tree4eff331f4bbfa8841c1a63b3fd9dedc93323e221 /build.sh
parent147c66d67ce83778fc3f102dd132ec095e6032fc (diff)
SL-10297: Eliminate llerror.cpp's Globals::messageStream and bool.
Instead of a single std::ostringstream instance shared by all callers, even those on different threads, make each of the relevant lllog_test_() and llcallstacks macros instantiate independent (stack) std::ostringstream objects. lllog_test_() is called by LL_DEBUGS(), LLINFOS(), LL_WARNS(), LL_ERRS(), LL_VLOGS() et al. Eliminate LLError::Log::out(), whose sole function was to arbitrate use of that shared std::ostringstream. Amusingly, if the lock couldn't be locked or if messageStreamInUse was set, out() would allocate a new (heap!) std::ostringstream anyway, which would then have to be freed by flush(). Make both LLError::Log::flush() overloads accept const std::ostringstream&. Make LL_ENDL pass the local _out instance. This eliminates the need to check whether the passed std::ostringstream* references the shared instance and (if so) reset it or (if not) delete it. Make LLError::LLCallStacks::insert() accept the local _out instance as non- const std::ostream&, rather than acquiring and returning std::ostringstream*. Make end() accept the local instance as const std::ostringstream&.
Diffstat (limited to 'build.sh')
0 files changed, 0 insertions, 0 deletions