fix review findings.
This commit is contained in:
@@ -42,6 +42,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#ifndef INCLUDED_AI_STRINGUTILS_H
|
||||
#define INCLUDED_AI_STRINGUTILS_H
|
||||
|
||||
#include <assimp/defs.h>
|
||||
|
||||
#include <sstream>
|
||||
#include <stdarg.h>
|
||||
#include <cstdlib>
|
||||
@@ -55,7 +57,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
/// @return The number of written characters if the buffer size was big enough. If an encoding error occurs, a negative number is returned.
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1900
|
||||
|
||||
inline
|
||||
AI_FORCE_INLINE
|
||||
int c99_ai_vsnprintf(char *outBuf, size_t size, const char *format, va_list ap) {
|
||||
int count(-1);
|
||||
if (0 != size) {
|
||||
@@ -68,7 +70,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
return count;
|
||||
}
|
||||
|
||||
inline
|
||||
AI_FORCE_INLINE
|
||||
int ai_snprintf(char *outBuf, size_t size, const char *format, ...) {
|
||||
int count;
|
||||
va_list ap;
|
||||
@@ -89,7 +91,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
/// @param value The value to write into the std::string.
|
||||
/// @return The value as a std::string
|
||||
template <typename T>
|
||||
inline
|
||||
AI_FORCE_INLINE
|
||||
std::string to_string( T value ) {
|
||||
std::ostringstream os;
|
||||
os << value;
|
||||
@@ -102,7 +104,7 @@ std::string to_string( T value ) {
|
||||
/// @param begin The first character of the string.
|
||||
/// @param end The last character
|
||||
/// @return The float value, 0.0f in cas of an error.
|
||||
inline
|
||||
AI_FORCE_INLINE
|
||||
float ai_strtof( const char *begin, const char *end ) {
|
||||
if ( nullptr == begin ) {
|
||||
return 0.0f;
|
||||
@@ -124,7 +126,7 @@ float ai_strtof( const char *begin, const char *end ) {
|
||||
/// @param toConvert Value to convert
|
||||
/// @return The hexadecimal string, is empty in case of an error.
|
||||
template<class T>
|
||||
inline
|
||||
AI_FORCE_INLINE
|
||||
std::string DecimalToHexa( T toConvert ) {
|
||||
std::string result;
|
||||
std::stringstream ss;
|
||||
|
||||
Reference in New Issue
Block a user