Merge branch 'master' into master
commit
0aa36ee550
|
@ -231,11 +231,7 @@ void ColladaParser::UriDecodePath(aiString &ss) {
|
|||
|
||||
// Maxon Cinema Collada Export writes "file:///C:\andsoon" with three slashes...
|
||||
// I need to filter it without destroying linux paths starting with "/somewhere"
|
||||
#if defined(_MSC_VER)
|
||||
if (ss.data[0] == '/' && isalpha((unsigned char)ss.data[1]) && ss.data[2] == ':') {
|
||||
#else
|
||||
if (ss.data[0] == '/' && isalpha((unsigned char)ss.data[1]) && ss.data[2] == ':') {
|
||||
#endif
|
||||
--ss.length;
|
||||
::memmove(ss.data, ss.data + 1, ss.length);
|
||||
ss.data[ss.length] = 0;
|
||||
|
|
|
@ -667,9 +667,7 @@ void XFileImporter::ConvertMaterials( aiScene* pScene, std::vector<XFile::Materi
|
|||
|
||||
// convert to lower case for easier comparison
|
||||
for ( unsigned int c = 0; c < sz.length(); ++c ) {
|
||||
if ( isalpha( (unsigned char) sz[ c ] ) ) {
|
||||
sz[ c ] = (char) tolower( (unsigned char) sz[ c ] );
|
||||
}
|
||||
sz[ c ] = (char) tolower( (unsigned char) sz[ c ] );
|
||||
}
|
||||
|
||||
// Place texture filename property under the corresponding name
|
||||
|
|
|
@ -992,8 +992,8 @@ void ParseExtensions(aiMetadata *metadata, const CustomExtension &extension) {
|
|||
metadata->Add(extension.name.c_str(), extension.mBoolValue.value);
|
||||
} else if (extension.mValues.isPresent) {
|
||||
aiMetadata val;
|
||||
for (size_t i = 0; i < extension.mValues.value.size(); ++i) {
|
||||
ParseExtensions(&val, extension.mValues.value[i]);
|
||||
for (auto const & subExtension : extension.mValues.value) {
|
||||
ParseExtensions(&val, subExtension);
|
||||
}
|
||||
metadata->Add(extension.name.c_str(), val);
|
||||
}
|
||||
|
@ -1001,8 +1001,8 @@ void ParseExtensions(aiMetadata *metadata, const CustomExtension &extension) {
|
|||
|
||||
void ParseExtras(aiMetadata *metadata, const CustomExtension &extension) {
|
||||
if (extension.mValues.isPresent) {
|
||||
for (size_t i = 0; i < extension.mValues.value.size(); ++i) {
|
||||
ParseExtensions(metadata, extension.mValues.value[i]);
|
||||
for (auto const & subExtension : extension.mValues.value) {
|
||||
ParseExtensions(metadata, subExtension);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -194,7 +194,7 @@ uint64_t strtoul10_64( const char* in, const char** out=0, unsigned int* max_ino
|
|||
|
||||
if ( *in < '0' || *in > '9' ) {
|
||||
// The string is known to be bad, so don't risk printing the whole thing.
|
||||
throw ExceptionType("The string \"", ai_str_toprintable(in, 30), "\" cannot be converted into a value." );
|
||||
throw ExceptionType("The string \"", ai_str_toprintable(in, (int)strlen(in)), "\" cannot be converted into a value." );
|
||||
}
|
||||
|
||||
for ( ;; ) {
|
||||
|
@ -294,7 +294,7 @@ const char* fast_atoreal_move(const char* c, Real& out, bool check_comma = true)
|
|||
if (!(c[0] >= '0' && c[0] <= '9') &&
|
||||
!((c[0] == '.' || (check_comma && c[0] == ',')) && c[1] >= '0' && c[1] <= '9')) {
|
||||
// The string is known to be bad, so don't risk printing the whole thing.
|
||||
throw ExceptionType("Cannot parse string \"", ai_str_toprintable(c, 30),
|
||||
throw ExceptionType("Cannot parse string \"", ai_str_toprintable(c, (int)strlen(c)),
|
||||
"\" as a real number: does not start with digit "
|
||||
"or decimal point followed by digit.");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue