Cute. It's fun to see game programmer code. This is really C with a little C++. Lots of pointer casts, comments like "The user must provide ample buffer space, preferably 256 chars or more." There's a lot of stuff in there to deal with Microsoft Visual C++'s interpretation of the language, which prior to 2010, was kind of off. Why does "swap" use EASTL/move_help.h? There are things that can go wrong with a move that…
namespace NS {
struct S {
friend void swap(S& a, S& b) {
// do something interesting here
}
};
}
// later..
template
void f(T& a, T& b) {
using std::swap;
swap(a, b); // calls NS::swap(a, b) if T = NS::S
}