std::string s(""); s = ""; calls the copy constructor, which in turn calls strlen(), … assigning a default-constructed string generates fewer instructions and is therefore preferred.
With C++11 uniform initialization, you’d simply write s = { } instead.
Add const to avoid creating a temporary copy.
This should fix the cmake compilation error on XGLLoader.cpp shown in bug #3445
The fix is similar to commit bbe6f7f213