diff --git a/code/StringUtils.h b/code/StringUtils.h index 275bcbfb2..638c00694 100644 --- a/code/StringUtils.h +++ b/code/StringUtils.h @@ -43,6 +43,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include /// @fn ai_snprintf /// @brief The portable version of the function snprintf ( C99 standard ), which works on visual studio compilers 2013 and earlier. @@ -80,5 +81,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # define ai_snprintf snprintf #endif +template +std::string to_string( T value ) { + std::ostringstream os; + os << value; + return os.str(); +} + #endif // INCLUDED_AI_STRINGUTILS_H diff --git a/code/XFileParser.cpp b/code/XFileParser.cpp index fc3752be8..800e128d3 100644 --- a/code/XFileParser.cpp +++ b/code/XFileParser.cpp @@ -50,6 +50,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "Exceptional.h" #include "TinyFormatter.h" #include "ByteSwapper.h" +#include "StringUtils.h" #include "../include/assimp/DefaultLogger.hpp"