diff --git a/code/3DSExporter.cpp b/code/3DSExporter.cpp index d2a353a57..8ad367058 100644 --- a/code/3DSExporter.cpp +++ b/code/3DSExporter.cpp @@ -147,7 +147,7 @@ namespace { void ExportScene3DS(const char* pFile, IOSystem* pIOSystem, const aiScene* pScene) { boost::shared_ptr outfile (pIOSystem->Open(pFile, "wb")); - if(outfile == NULL) { + if(!outfile) { throw DeadlyExportError("Could not open output .3ds file: " + std::string(pFile)); } diff --git a/code/AssbinExporter.cpp b/code/AssbinExporter.cpp index 29ebfeee7..c28058778 100644 --- a/code/AssbinExporter.cpp +++ b/code/AssbinExporter.cpp @@ -728,7 +728,7 @@ inline size_t WriteArray(IOStream * stream, const T* in, unsigned int size) // is compressed using standard DEFLATE from zlib. if (compressed) { - AssbinChunkWriter uncompressedStream( NULL, NULL ); + AssbinChunkWriter uncompressedStream( NULL, 0 ); WriteBinaryScene( &uncompressedStream, pScene ); uLongf uncompressedSize = uncompressedStream.Tell(); diff --git a/code/AssbinLoader.cpp b/code/AssbinLoader.cpp index a17d37f9e..20f707df5 100644 --- a/code/AssbinLoader.cpp +++ b/code/AssbinLoader.cpp @@ -195,7 +195,7 @@ template void ReadBounds( IOStream * stream, T* p, unsigned int n ) void AssbinImporter::ReadBinaryNode( IOStream * stream, aiNode** node ) { ai_assert( Read(stream) == ASSBIN_CHUNK_AINODE); - uint32_t size = Read(stream); + /*uint32_t size =*/ Read(stream); *node = new aiNode(); @@ -226,7 +226,7 @@ void AssbinImporter::ReadBinaryNode( IOStream * stream, aiNode** node ) void AssbinImporter::ReadBinaryBone( IOStream * stream, aiBone* b ) { ai_assert( Read(stream) == ASSBIN_CHUNK_AIBONE ); - uint32_t size = Read(stream); + /*uint32_t size =*/ Read(stream); b->mName = Read(stream); b->mNumWeights = Read(stream); @@ -249,7 +249,7 @@ void AssbinImporter::ReadBinaryBone( IOStream * stream, aiBone* b ) void AssbinImporter::ReadBinaryMesh( IOStream * stream, aiMesh* mesh ) { ai_assert( Read(stream) == ASSBIN_CHUNK_AIMESH); - uint32_t size = Read(stream); + /*uint32_t size =*/ Read(stream); mesh->mPrimitiveTypes = Read(stream); mesh->mNumVertices = Read(stream); @@ -373,7 +373,7 @@ void AssbinImporter::ReadBinaryMesh( IOStream * stream, aiMesh* mesh ) void AssbinImporter::ReadBinaryMaterialProperty(IOStream * stream, aiMaterialProperty* prop) { ai_assert( Read(stream) == ASSBIN_CHUNK_AIMATERIALPROPERTY); - uint32_t size = Read(stream); + /*uint32_t size =*/ Read(stream); prop->mKey = Read(stream); prop->mSemantic = Read(stream); @@ -389,7 +389,7 @@ void AssbinImporter::ReadBinaryMaterialProperty(IOStream * stream, aiMaterialPro void AssbinImporter::ReadBinaryMaterial(IOStream * stream, aiMaterial* mat) { ai_assert( Read(stream) == ASSBIN_CHUNK_AIMATERIAL); - uint32_t size = Read(stream); + /*uint32_t size =*/ Read(stream); mat->mNumAllocated = mat->mNumProperties = Read(stream); if (mat->mNumProperties) @@ -410,7 +410,7 @@ void AssbinImporter::ReadBinaryMaterial(IOStream * stream, aiMaterial* mat) void AssbinImporter::ReadBinaryNodeAnim(IOStream * stream, aiNodeAnim* nd) { ai_assert( Read(stream) == ASSBIN_CHUNK_AINODEANIM); - uint32_t size = Read(stream); + /*uint32_t size =*/ Read(stream); nd->mNodeName = Read(stream); nd->mNumPositionKeys = Read(stream); @@ -458,7 +458,7 @@ void AssbinImporter::ReadBinaryNodeAnim(IOStream * stream, aiNodeAnim* nd) void AssbinImporter::ReadBinaryAnim( IOStream * stream, aiAnimation* anim ) { ai_assert( Read(stream) == ASSBIN_CHUNK_AIANIMATION); - uint32_t size = Read(stream); + /*uint32_t size =*/ Read(stream); anim->mName = Read (stream); anim->mDuration = Read (stream); @@ -478,7 +478,7 @@ void AssbinImporter::ReadBinaryAnim( IOStream * stream, aiAnimation* anim ) void AssbinImporter::ReadBinaryTexture(IOStream * stream, aiTexture* tex) { ai_assert( Read(stream) == ASSBIN_CHUNK_AITEXTURE); - uint32_t size = Read(stream); + /*uint32_t size =*/ Read(stream); tex->mWidth = Read(stream); tex->mHeight = Read(stream); @@ -501,7 +501,7 @@ void AssbinImporter::ReadBinaryTexture(IOStream * stream, aiTexture* tex) void AssbinImporter::ReadBinaryLight( IOStream * stream, aiLight* l ) { ai_assert( Read(stream) == ASSBIN_CHUNK_AILIGHT); - uint32_t size = Read(stream); + /*uint32_t size =*/ Read(stream); l->mName = Read(stream); l->mType = (aiLightSourceType)Read(stream); @@ -527,7 +527,7 @@ void AssbinImporter::ReadBinaryLight( IOStream * stream, aiLight* l ) void AssbinImporter::ReadBinaryCamera( IOStream * stream, aiCamera* cam ) { ai_assert( Read(stream) == ASSBIN_CHUNK_AICAMERA); - uint32_t size = Read(stream); + /*uint32_t size =*/ Read(stream); cam->mName = Read(stream); cam->mPosition = Read(stream); @@ -542,7 +542,7 @@ void AssbinImporter::ReadBinaryCamera( IOStream * stream, aiCamera* cam ) void AssbinImporter::ReadBinaryScene( IOStream * stream, aiScene* scene ) { ai_assert( Read(stream) == ASSBIN_CHUNK_AISCENE); - uint32_t size = Read(stream); + /*uint32_t size =*/ Read(stream); scene->mFlags = Read(stream); scene->mNumMeshes = Read(stream); @@ -626,10 +626,10 @@ void AssbinImporter::InternReadFile( const std::string& pFile, aiScene* pScene, stream->Seek( 44, aiOrigin_CUR ); // signature - unsigned int versionMajor = Read(stream); - unsigned int versionMinor = Read(stream); - unsigned int versionRevision = Read(stream); - unsigned int compileFlags = Read(stream); + /*unsigned int versionMajor =*/ Read(stream); + /*unsigned int versionMinor =*/ Read(stream); + /*unsigned int versionRevision =*/ Read(stream); + /*unsigned int compileFlags =*/ Read(stream); shortened = Read(stream) > 0; compressed = Read(stream) > 0; diff --git a/code/Exporter.cpp b/code/Exporter.cpp index c105e36ba..22c60ebee 100644 --- a/code/Exporter.cpp +++ b/code/Exporter.cpp @@ -120,7 +120,7 @@ Exporter::ExportFormatEntry gExporters[] = #endif #ifndef ASSIMP_BUILD_NO_ASSBIN_EXPORTER - Exporter::ExportFormatEntry( "assbin", "Assimp Binary", "assbin" , &ExportSceneAssbin, NULL), + Exporter::ExportFormatEntry( "assbin", "Assimp Binary", "assbin" , &ExportSceneAssbin, 0), #endif }; diff --git a/code/FBXParser.cpp b/code/FBXParser.cpp index f6dc2e7e2..2b5a85bdc 100644 --- a/code/FBXParser.cpp +++ b/code/FBXParser.cpp @@ -93,7 +93,7 @@ namespace { } // ------------------------------------------------------------------------------------------------ - void ParseWarning(const std::string& message, const Element* element = NULL) +/* void ParseWarning(const std::string& message, const Element* element = NULL) { if(element) { ParseWarning(message,element->KeyToken()); @@ -103,7 +103,7 @@ namespace { DefaultLogger::get()->warn("FBX-Parser: " + message); } } - +*/ // ------------------------------------------------------------------------------------------------ void ParseError(const std::string& message, TokenPtr token) { diff --git a/code/OgreStructs.cpp b/code/OgreStructs.cpp index 6311d0b6c..40dda5fb9 100644 --- a/code/OgreStructs.cpp +++ b/code/OgreStructs.cpp @@ -404,9 +404,9 @@ size_t IndexData::FaceSize() const // Mesh Mesh::Mesh() : - sharedVertexData(0), - skeleton(0), - hasSkeletalAnimations(false) + hasSkeletalAnimations(false), + skeleton(NULL), + sharedVertexData(NULL) { } @@ -712,8 +712,8 @@ aiMesh *SubMesh::ConvertToAssimpMesh(Mesh *parent) // MeshXml MeshXml::MeshXml() : - sharedVertexData(0), - skeleton(0) + skeleton(0), + sharedVertexData(0) { } @@ -797,8 +797,8 @@ void MeshXml::ConvertToAssimpScene(aiScene* dest) // SubMeshXml SubMeshXml::SubMeshXml() : - vertexData(0), - indexData(new IndexDataXml()) + indexData(new IndexDataXml()), + vertexData(0) { } @@ -912,8 +912,8 @@ aiMesh *SubMeshXml::ConvertToAssimpMesh(MeshXml *parent) // Animation Animation::Animation(Skeleton *parent) : + parentMesh(NULL), parentSkeleton(parent), - parentMesh(0), length(0.0f), baseTime(-1.0f) { @@ -1124,8 +1124,8 @@ aiBone *Bone::ConvertToAssimpBone(Skeleton *parent, const std::vector &supportedExtensions) { supportedExtensions.push_back( ".jpg" ); supportedExtensions.push_back( ".png" ); supportedExtensions.push_back( ".tga" ); } +*/ using namespace Q3BSP; diff --git a/contrib/clipper/clipper.cpp b/contrib/clipper/clipper.cpp index b9754e4eb..1efa01df8 100644 --- a/contrib/clipper/clipper.cpp +++ b/contrib/clipper/clipper.cpp @@ -2124,11 +2124,13 @@ void Clipper::AddOutPt(TEdge *e, const IntPoint &pt) { //check for 'rounding' artefacts ... if (outRec->sides == esNeither && pt.Y == op->pt.Y) + { if (ToFront) { if (pt.X == op->pt.X +1) return; //ie wrong side of bottomPt } else if (pt.X == op->pt.X -1) return; //ie wrong side of bottomPt + } outRec->sides = (EdgeSide)(outRec->sides | e->side); if (outRec->sides == esBoth)