--- external/collada2gltf/patches/kill_c++11_code.patch.1.orig 2014-10-23 07:32:50.000000000 -0400 +++ external/collada2gltf/patches/kill_c++11_code.patch.1 2014-10-31 02:10:16.000000000 -0400 @@ -1531,8 +1531,8 @@ diff -ur collada2gltf.org/extensions/o3dgc-compression/GLTF-Open3DGC.cpp collada2gltf/extensions/o3dgc-compression/GLTF-Open3DGC.cpp ---- collada2gltf.org/extensions/o3dgc-compression/GLTF-Open3DGC.cpp 2014-09-29 15:30:40.134494471 +0200 -+++ collada2gltf/extensions/o3dgc-compression/GLTF-Open3DGC.cpp 2014-09-29 15:55:51.898551665 +0200 +--- collada2gltf.org/extensions/o3dgc-compression/GLTF-Open3DGC.cpp 2014-05-25 05:30:45.143840000 -0400 ++++ collada2gltf/extensions/o3dgc-compression/GLTF-Open3DGC.cpp 2014-10-31 01:56:34.000000000 -0400 @@ -138,7 +138,7 @@ return true; } @@ -1563,7 +1563,7 @@ for (unsigned int i = 0 ; i < primitivesCount ; i++) { - shared_ptr primitive = static_pointer_cast(primitives[i]); -+ boost::shared_ptr primitive = static_pointer_cast(primitives[i]); ++ boost::shared_ptr primitive = boost::static_pointer_cast(primitives[i]); if (primitive->getPrimitive() != profile->getGLenumForString("TRIANGLES")) { return false; } @@ -1590,7 +1590,7 @@ for (unsigned int i = 0 ; i < primitivesCount ; i++) { - shared_ptr primitive = static_pointer_cast(primitives[i]); - shared_ptr uniqueIndices = primitive->getIndices(); -+ boost::shared_ptr primitive = static_pointer_cast(primitives[i]); ++ boost::shared_ptr primitive = boost::static_pointer_cast(primitives[i]); + boost::shared_ptr uniqueIndices = primitive->getIndices(); unsigned int indicesCount = (unsigned int)(uniqueIndices->getCount()); //FIXME: assumes triangles, but we are guarded from issues by canEncodeOpen3DGCMesh @@ -1601,7 +1601,7 @@ allTrianglesCount += trianglesCount; - shared_ptr primitive = static_pointer_cast(primitives[i]); - shared_ptr uniqueIndices = primitive->getIndices(); -+ boost::shared_ptr primitive = static_pointer_cast(primitives[i]); ++ boost::shared_ptr primitive = boost::static_pointer_cast(primitives[i]); + boost::shared_ptr uniqueIndices = primitive->getIndices(); unsigned int indicesCount = (unsigned int)(uniqueIndices->getCount()); unsigned int* indicesPtr = (unsigned int*)uniqueIndices->getBufferView()->getBufferDataByApplyingOffset(); @@ -1620,7 +1620,7 @@ params.SetNumFloatAttributes(nFloatAttributes); ifs.SetNumFloatAttributes(nFloatAttributes); - shared_ptr compressionObject = static_pointer_cast(mesh->getExtensions()->createObjectIfNeeded("Open3DGC-compression")); -+ boost::shared_ptr compressionObject = static_pointer_cast(mesh->getExtensions()->createObjectIfNeeded("Open3DGC-compression")); ++ boost::shared_ptr compressionObject = boost::static_pointer_cast(mesh->getExtensions()->createObjectIfNeeded("Open3DGC-compression")); ifs.ComputeMinMax(O3DGC_SC3DMC_MAX_ALL_DIMS); BinaryStream bstream(vertexCount * 8); @@ -4251,8 +4251,20 @@ #endif diff -ur collada2gltf.org/helpers/geometryHelpers.cpp collada2gltf/helpers/geometryHelpers.cpp ---- collada2gltf.org/helpers/geometryHelpers.cpp 2014-09-29 15:30:40.146494472 +0200 -+++ collada2gltf/helpers/geometryHelpers.cpp 2014-09-29 16:01:12.134563781 +0200 +--- collada2gltf.org/helpers/geometryHelpers.cpp 2014-05-25 05:30:45.143840000 -0400 ++++ collada2gltf/helpers/geometryHelpers.cpp 2014-10-31 01:56:35.000000000 -0400 +@@ -121,9 +121,9 @@ + } + }; + +- typedef unordered_map RemappedMeshIndexesHashmap; ++ typedef boost::unordered_map RemappedMeshIndexesHashmap; + +- typedef unordered_map IndicesMap; ++ typedef boost::unordered_map IndicesMap; + + //FIXME: this could be just an intermediate anonymous(no id) GLTFBuffer + class GLTFPrimitiveRemapInfos @@ -193,8 +193,8 @@ for (size_t meshAttributeIndex = 0 ; meshAttributeIndex < count; meshAttributeIndex++) { MeshAttributesBufferInfos *bufferInfos = &allBufferInfos[meshAttributeIndex]; @@ -4372,7 +4384,7 @@ unsigned int* indicesInRemapping = (unsigned int*)malloc(sizeof(unsigned int) * allIndices->size()); - shared_ptr sourcePrimitive = static_pointer_cast(sourcePrimitives[i]); -+ boost::shared_ptr sourcePrimitive = static_pointer_cast(sourcePrimitives[i]); ++ boost::shared_ptr sourcePrimitive = boost::static_pointer_cast(sourcePrimitives[i]); VertexAttributeVector vertexAttributes = sourcePrimitive->getVertexAttributes(); for (unsigned int k = 0 ; k < allIndices->size() ; k++) { GLTF::Semantic semantic = vertexAttributes[k]->getSemantic(); @@ -4381,7 +4393,7 @@ } - shared_ptr targetPrimitive = static_pointer_cast(targetPrimitives[i]); -+ boost::shared_ptr targetPrimitive = static_pointer_cast(targetPrimitives[i]); ++ boost::shared_ptr targetPrimitive = boost::static_pointer_cast(targetPrimitives[i]); - shared_ptr primitiveRemapInfos = __BuildPrimitiveUniqueIndexes(targetPrimitive, *allIndices, remappedMeshIndexesMap, indicesInRemapping, startIndex, maxVertexAttributes, endIndex, profile); + boost::shared_ptr primitiveRemapInfos = __BuildPrimitiveUniqueIndexes(targetPrimitive, *allIndices, remappedMeshIndexesMap, indicesInRemapping, startIndex, maxVertexAttributes, endIndex, profile); @@ -4425,7 +4437,7 @@ IndicesVector *allIndices = allIndicesSharedPtr.get(); unsigned int* indicesInRemapping = (unsigned int*)calloc(sizeof(unsigned int) * (*allIndices).size(), 1); - shared_ptr sourcePrimitive = static_pointer_cast(sourcePrimitives[i]); -+ boost::shared_ptr sourcePrimitive = static_pointer_cast(sourcePrimitives[i]); ++ boost::shared_ptr sourcePrimitive = boost::static_pointer_cast(sourcePrimitives[i]); VertexAttributeVector vertexAttributes = sourcePrimitive->getVertexAttributes(); for (unsigned int k = 0 ; k < (*allIndices).size() ; k++) { @@ -4434,7 +4446,7 @@ } - shared_ptr targetPrimitive = static_pointer_cast(targetPrimitives[i]); -+ boost::shared_ptr targetPrimitive = static_pointer_cast(targetPrimitives[i]); ++ boost::shared_ptr targetPrimitive = boost::static_pointer_cast(targetPrimitives[i]); bool status = __RemapPrimitiveVertices(targetPrimitive, (*allIndices), originalMeshAttributes , @@ -4511,7 +4523,7 @@ for (size_t i = 0 ; i < primitives.size() ; i++) { - shared_ptr primitive = static_pointer_cast(primitives[i]); -+ boost::shared_ptr primitive = static_pointer_cast(primitives[i]); ++ boost::shared_ptr primitive = boost::static_pointer_cast(primitives[i]); } if (!splitNeeded) @@ -4549,7 +4561,7 @@ + boost::shared_ptr targetPrimitive; //when we are done with a primitive we mark its nextIndice with a -1 - shared_ptr primitive = static_pointer_cast (primitives[i]); -+ boost::shared_ptr primitive = static_pointer_cast (primitives[i]); ++ boost::shared_ptr primitive = boost::static_pointer_cast (primitives[i]); - targetPrimitive = shared_ptr (new GLTFPrimitive((*primitive))); + targetPrimitive = boost::shared_ptr (new GLTFPrimitive((*primitive))); @@ -4590,7 +4602,7 @@ - shared_ptr refPrimitive = static_pointer_cast(primitives[i]); - shared_ptr targetPrimitive = shared_ptr (new GLTFPrimitive((*refPrimitive))); + boost::shared_ptr targetMesh = boost::shared_ptr (new GLTFMesh()); -+ boost::shared_ptr refPrimitive = static_pointer_cast(primitives[i]); ++ boost::shared_ptr refPrimitive = boost::static_pointer_cast(primitives[i]); + boost::shared_ptr targetPrimitive = boost::shared_ptr (new GLTFPrimitive((*refPrimitive))); targetMesh->appendPrimitive(targetPrimitive); @@ -4612,7 +4624,7 @@ // Now for each mesh attribute in the mesh, create another one just for the primitive - shared_ptr primitive = static_pointer_cast(primitives[i]); -+ boost::shared_ptr primitive = static_pointer_cast(primitives[i]); ++ boost::shared_ptr primitive = boost::static_pointer_cast(primitives[i]); VertexAttributeVector vertexAttributes = primitive->getVertexAttributes(); for (size_t j = 0 ; j < vertexAttributes.size() ; j++) { Semantic semantic = vertexAttributes[j]->getSemantic(); @@ -4786,8 +4798,8 @@ if (JSONValue::isEqualTo(value) == true) return true; diff -ur collada2gltf.org/JSON/JSONObject.cpp collada2gltf/JSON/JSONObject.cpp ---- collada2gltf.org/JSON/JSONObject.cpp 2014-09-29 15:30:40.142494472 +0200 -+++ collada2gltf/JSON/JSONObject.cpp 2014-09-29 15:48:14.562534363 +0200 +--- collada2gltf.org/JSON/JSONObject.cpp 2014-05-25 05:30:45.116840000 -0400 ++++ collada2gltf/JSON/JSONObject.cpp 2014-10-31 01:56:34.000000000 -0400 @@ -38,8 +38,8 @@ namespace GLTF { @@ -4815,7 +4827,7 @@ array->_parseRapidJSONArray(currentValue); this->setValue(key, array); } -@@ -128,10 +128,10 @@ +@@ -128,30 +128,30 @@ { } @@ -4828,8 +4840,9 @@ + outObject = boost::shared_ptr (new GLTF::JSONObject()); setValue(key, outObject); } else { - outObject = static_pointer_cast (getValue(key)); -@@ -139,10 +139,10 @@ +- outObject = static_pointer_cast (getValue(key)); ++ outObject = boost::static_pointer_cast (getValue(key)); + } return outObject; } @@ -4842,8 +4855,10 @@ + outObject = boost::shared_ptr (new GLTF::JSONArray()); setValue(key, outObject); } else { - outObject = static_pointer_cast (getValue(key)); -@@ -151,7 +151,7 @@ +- outObject = static_pointer_cast (getValue(key)); ++ outObject = boost::static_pointer_cast (getValue(key)); + } + return outObject; } @@ -4863,16 +4878,18 @@ - shared_ptr JSONObject::getObject(const std::string &key) { - shared_ptr value = this->_keyToJSONValue[key]; +- return static_pointer_cast (value); + boost::shared_ptr JSONObject::getObject(const std::string &key) { + boost::shared_ptr value = this->_keyToJSONValue[key]; - return static_pointer_cast (value); ++ return boost::static_pointer_cast (value); } - shared_ptr JSONObject::getArray(const std::string &key) { - shared_ptr value = this->_keyToJSONValue[key]; +- return static_pointer_cast (value); + boost::shared_ptr JSONObject::getArray(const std::string &key) { + boost::shared_ptr value = this->_keyToJSONValue[key]; - return static_pointer_cast (value); ++ return boost::static_pointer_cast (value); } void JSONObject::setUnsignedInt32(const std::string &key, unsigned int value) { @@ -4883,7 +4900,7 @@ unsigned int JSONObject::getUnsignedInt32(const std::string &key) { if (this->contains(key)) { - shared_ptr number = static_pointer_cast (this->getValue(key)); -+ boost::shared_ptr number = static_pointer_cast (this->getValue(key)); ++ boost::shared_ptr number = boost::static_pointer_cast (this->getValue(key)); return number->getUnsignedInt32(); } return 0; @@ -4897,7 +4914,7 @@ bool JSONObject::getBool(const std::string &key) { if (this->contains(key)) { - shared_ptr number = static_pointer_cast (this->getValue(key)); -+ boost::shared_ptr number = static_pointer_cast (this->getValue(key)); ++ boost::shared_ptr number = boost::static_pointer_cast (this->getValue(key)); return number->getBool(); } @@ -4912,7 +4929,7 @@ int JSONObject::getInt32(const std::string &key) { if (this->contains(key)) { - shared_ptr number = static_pointer_cast (this->getValue(key)); -+ boost::shared_ptr number = static_pointer_cast (this->getValue(key)); ++ boost::shared_ptr number = boost::static_pointer_cast (this->getValue(key)); return number->getInt32(); } return 0; @@ -4926,7 +4943,7 @@ double JSONObject::getDouble(const std::string &key) { if (this->contains(key)) { - shared_ptr number = static_pointer_cast (this->getValue(key)); -+ boost::shared_ptr number = static_pointer_cast (this->getValue(key)); ++ boost::shared_ptr number = boost::static_pointer_cast (this->getValue(key)); return number->getDouble(); } return 0; @@ -4940,7 +4957,7 @@ const std::string JSONObject::getString(const std::string &key) { if (this->contains(key)) { - shared_ptr str = static_pointer_cast (this->getValue(key)); -+ boost::shared_ptr str = static_pointer_cast (this->getValue(key)); ++ boost::shared_ptr str = boost::static_pointer_cast (this->getValue(key)); return str->getString(); } return ""; @@ -4994,7 +5011,7 @@ JSONValueVectorRef allKeys = keysA->values(); for (size_t i = 0 ; i < allKeys.size() ; i++) { - shared_ptr key = static_pointer_cast(allKeys[i]); -+ boost::shared_ptr key = static_pointer_cast(allKeys[i]); ++ boost::shared_ptr key = boost::static_pointer_cast(allKeys[i]); - shared_ptr objA = this->getValue(key->getString()); - shared_ptr objB = objectValue->getValue(key->getString());