Merge threadbase.h into thread.h since we no longer need to have “secret”
thread implementations; all the platforms we care about have std::thread
or just don’t support threads at all.
Since C++11 threads are available on every platform that has threads, we
no longer need our pthread implementation. The LOL_FEATURE_CXX11_THREADS
macro is gone, too, and we now just use LOL_FEATURE_THREADS.
Note that it is still necessary to link with -lpthread or -pthread on
some platforms, so we don’t throw that part away.
Add mingw-std-threads project to external/ for full C++11 thread support, fix
an incorrect Win32 fix I did in PEGTL, work around mingw’s <io.h> declaring a
conflicting eof symbol, and fix a capitalisation error in log.cpp.
The C++ standard (21.5 Numeric conversions) says that %lld must be available,
however mingw still does not support it and in the meantime the most practical
solution seems to use long int instead of long long int.
Using “Array” instead of “array” is now fully deprecated, and I replaced
the Log::Debug() etc. functions with msg::debug() etc. because log:: was
unavailable due to being a maths function.
Added up-to-date copyright notice and BOM to modified files, just in case.
The containers no longer force the user to use the ptrdiff_t type for
size information. For convenience, size() now always returns an int,
and the size_s() method offers a way to handle arrays with more than
2 billion elements. Internally, we still use ptrdiff_t, though.
Since so much code had to be changed, I took the opportunity to get
rid of capitalised accessors for classes that are lowercase.
In release mode our asserts are ignored for performance reasons and all
the code they may be executing is disabled, so no side effects will happen.
We can’t put programming logic in asserts.
Box objects (AABB) now have the long awaited extent() and center()
methods. Corners are now called “aa” and “bb” for convenience. The
WorldEntity class uses a box3 for its AABB instead of two vec3s.
This allows us to simplify a lot of verbose code.