continued conversion to units system
made units perform type promotion correctly and preserve type in arithmetic
e.g. can now do LLVector3 in units
added typedefs for remaining common unit types, including implicits
changed Units macros and argument order to make it more clear
optimized units for integer types
fixed merging of periodicrecordings...should eliminate duplicate entries in sceneloadmonitor history
cleaning up build
moved most includes of windows.h to llwin32headers.h to disable min/max macros, etc
streamlined Time class and consolidated functionality in BlockTimer class
llfasttimer is no longer included via llstring.h, so had to add it manually in several places
Moved confirmSavingTexture() and onSavingTextureConfirmed() from LLSnapshotLivePreview to LLFloaterSnapshot::Impl so that the notification confirmation completes before LLFloaterSnapshot is closed.
by over 50 times.
Looking at the usage, toHTTPDateStream is not called anywhere (except
internally by toHTTPDateString), and toHTTPDateString is called only
once outside of lldate.cpp, by LLStringUtil::formatDatetime. Also, the
method is most commonly called with a single two-character token, such
as "%Y" or "%A".
I therefore removed toHTTPDateStream and optimized toHTTPDateString.
Setting the locale was the most expensive operation, so I looked into
caching that, both in terms of std::ostream and strftime. The timings
for those implementations (averaged over 10 calls) is:
toHTTPDateString timings:
- with ostream (current) -> 0.314156 ms
- with ostream and std::locale caching -> 0.033999 ms
- with strftime and setlocale() caching -> 0.005985 ms
I therefore went with the standard C library strftime solution.
I also wrote a few unit tests to make sure that I didn't break any
existing functionality, and tested this under Windows and Linux.
Reviewed by steve.
(1) the LLLand class had to be forward declared in a cpp file that did not include llland.h
(2) ensure_equals(const char*, type, type) requires that type have an operator!=(type, type) defined.
(3) ensure_equals(const char*, type, type) is so overloaded that the compiler can have trouble picking the right version when it has to implicitly cast a std::string to "const char*" AND multiple valid casts exist for type --> S32, F32, etc. To solve this problem we must explicitly pass in a "const char*" instead of a std::string.
Reviewed with CG