[C++] Playing with references and types can be hazardous

Well, working on my own Game Engine this week-end, I lost like 5 hours of my life debugging it … and finally, I found that I played with references and types without paying enough attention at it.

inline static bool loadDouble(const QJsonObject& qJsonObject, const char* valueName, quint32& out_int) {
    double d;
    bool res = loadDouble(qJsonObject, valueName, d);
    out_int = d;
    return res;
}

This resulted in writing the end of the d double outside of the out_int quint32.
Simply casting the double solved the overflow.

inline static bool loadDouble(const QJsonObject& qJsonObject, const char* valueName, quint32& out_int) {
    double d;
    bool res = loadDouble(qJsonObject, valueName, d);
    out_int = (quint32)d;
    return res;
}