[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [48716] branches/soc-2012-bratwurst/extern /assimp: - ext_assimp: merge https://github.com/acgessler/ assimp-gsoc2012-fbx - fix some -Wall warnings ( mostly -Wreorder and -Wunused..
Alexander Gessler
alexander.gessler at gmx.net
Sun Jul 8 01:32:45 CEST 2012
Revision: 48716
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48716
Author: aramis_acg
Date: 2012-07-07 23:32:44 +0000 (Sat, 07 Jul 2012)
Log Message:
-----------
- ext_assimp: merge https://github.com/acgessler/assimp-gsoc2012-fbx - fix some -Wall warnings (mostly -Wreorder and -Wunused.. stuff).
Modified Paths:
--------------
branches/soc-2012-bratwurst/extern/assimp/code/FBXDocument.cpp
branches/soc-2012-bratwurst/extern/assimp/code/FBXMeshGeometry.cpp
branches/soc-2012-bratwurst/extern/assimp/code/FBXParser.cpp
branches/soc-2012-bratwurst/extern/assimp/code/FBXProperties.cpp
branches/soc-2012-bratwurst/extern/assimp/code/IFCMaterial.cpp
branches/soc-2012-bratwurst/extern/assimp/code/M3Importer.cpp
branches/soc-2012-bratwurst/extern/assimp/code/XGLLoader.cpp
branches/soc-2012-bratwurst/extern/assimp/contrib/poly2tri/poly2tri/common/shapes.cc
branches/soc-2012-bratwurst/extern/assimp/contrib/poly2tri/poly2tri/sweep/sweep.cc
Removed Paths:
-------------
branches/soc-2012-bratwurst/extern/assimp/code/makefile.mingw
Modified: branches/soc-2012-bratwurst/extern/assimp/code/FBXDocument.cpp
===================================================================
--- branches/soc-2012-bratwurst/extern/assimp/code/FBXDocument.cpp 2012-07-07 22:51:57 UTC (rev 48715)
+++ branches/soc-2012-bratwurst/extern/assimp/code/FBXDocument.cpp 2012-07-07 23:32:44 UTC (rev 48716)
@@ -465,8 +465,8 @@
// ------------------------------------------------------------------------------------------------
Document::Document(const Parser& parser, const ImportSettings& settings)
-: parser(parser)
-, settings(settings)
+: settings(settings)
+, parser(parser)
{
// cannot use array default initialization syntax because vc8 fails on it
for (unsigned int i = 0; i < 7; ++i) {
@@ -707,9 +707,9 @@
// ------------------------------------------------------------------------------------------------
Connection::Connection(uint64_t insertionOrder, uint64_t src, uint64_t dest, const std::string& prop, const Document& doc)
: insertionOrder(insertionOrder)
+, prop(prop)
, src(src)
, dest(dest)
-, prop(prop)
, doc(doc)
{
ai_assert(doc.Objects().find(src) != doc.Objects().end());
Modified: branches/soc-2012-bratwurst/extern/assimp/code/FBXMeshGeometry.cpp
===================================================================
--- branches/soc-2012-bratwurst/extern/assimp/code/FBXMeshGeometry.cpp 2012-07-07 22:51:57 UTC (rev 48715)
+++ branches/soc-2012-bratwurst/extern/assimp/code/FBXMeshGeometry.cpp 2012-07-07 23:32:44 UTC (rev 48716)
@@ -72,9 +72,6 @@
// optional Mesh elements:
const ElementCollection& Layer = sc->GetCollection("Layer");
- const ElementCollection& LayerElementMaterial = sc->GetCollection("LayerElementMaterial");
- const ElementCollection& LayerElementUV = sc->GetCollection("LayerElementUV");
- const ElementCollection& LayerElementNormal = sc->GetCollection("LayerElementNormal");
std::vector<aiVector3D> tempVerts;
ReadVectorDataArray(tempVerts,Vertices);
Modified: branches/soc-2012-bratwurst/extern/assimp/code/FBXParser.cpp
===================================================================
--- branches/soc-2012-bratwurst/extern/assimp/code/FBXParser.cpp 2012-07-07 22:51:57 UTC (rev 48715)
+++ branches/soc-2012-bratwurst/extern/assimp/code/FBXParser.cpp 2012-07-07 23:32:44 UTC (rev 48716)
@@ -165,9 +165,9 @@
// ------------------------------------------------------------------------------------------------
Parser::Parser (const TokenList& tokens)
: tokens(tokens)
-, cursor(tokens.begin())
-, current()
, last()
+, current()
+, cursor(tokens.begin())
{
root.reset(new Scope(*this,true));
}
@@ -276,7 +276,6 @@
return 0.0f;
}
- const char* inout = t.begin();
// need to copy the input string to a temporary buffer
// first - next in the fbx token stream comes ',',
Modified: branches/soc-2012-bratwurst/extern/assimp/code/FBXProperties.cpp
===================================================================
--- branches/soc-2012-bratwurst/extern/assimp/code/FBXProperties.cpp 2012-07-07 22:51:57 UTC (rev 48715)
+++ branches/soc-2012-bratwurst/extern/assimp/code/FBXProperties.cpp 2012-07-07 23:32:44 UTC (rev 48716)
@@ -129,15 +129,15 @@
// ------------------------------------------------------------------------------------------------
PropertyTable::PropertyTable()
-: element()
-, templateProps()
+: templateProps()
+, element()
{
}
// ------------------------------------------------------------------------------------------------
PropertyTable::PropertyTable(const Element& element, boost::shared_ptr<const PropertyTable> templateProps)
-: element(&element)
-, templateProps(templateProps)
+: templateProps(templateProps)
+, element(&element)
{
const Scope& scope = GetRequiredScope(element);
BOOST_FOREACH(const ElementMap::value_type& v, scope.Elements()) {
Modified: branches/soc-2012-bratwurst/extern/assimp/code/IFCMaterial.cpp
===================================================================
--- branches/soc-2012-bratwurst/extern/assimp/code/IFCMaterial.cpp 2012-07-07 22:51:57 UTC (rev 48715)
+++ branches/soc-2012-bratwurst/extern/assimp/code/IFCMaterial.cpp 2012-07-07 23:32:44 UTC (rev 48716)
@@ -123,10 +123,10 @@
}
}
}
- }
+ } /*
else if (const IFC::IfcSurfaceStyleWithTextures* tex = sel2->ResolveSelectPtr<IFC::IfcSurfaceStyleWithTextures>(conv.db)) {
// XXX
- }
+ } */
}
}
Modified: branches/soc-2012-bratwurst/extern/assimp/code/M3Importer.cpp
===================================================================
--- branches/soc-2012-bratwurst/extern/assimp/code/M3Importer.cpp 2012-07-07 22:51:57 UTC (rev 48715)
+++ branches/soc-2012-bratwurst/extern/assimp/code/M3Importer.cpp 2012-07-07 23:32:44 UTC (rev 48716)
@@ -113,8 +113,7 @@
}
m_Buffer.resize( filesize );
- size_t readsize = file->Read( &m_Buffer[ 0 ], sizeof( unsigned char ), filesize );
- ai_assert( readsize == filesize );
+ file->Read( &m_Buffer[ 0 ], sizeof( unsigned char ), filesize );
m_pHead = reinterpret_cast<MD33*>( &m_Buffer[ 0 ] );
m_pRefs = reinterpret_cast<ReferenceEntry*>( &m_Buffer[ 0 ] + m_pHead->ofsRefs );
Modified: branches/soc-2012-bratwurst/extern/assimp/code/XGLLoader.cpp
===================================================================
--- branches/soc-2012-bratwurst/extern/assimp/code/XGLLoader.cpp 2012-07-07 22:51:57 UTC (rev 48715)
+++ branches/soc-2012-bratwurst/extern/assimp/code/XGLLoader.cpp 2012-07-07 23:32:44 UTC (rev 48716)
@@ -394,7 +394,7 @@
// XXX
}
else if (s == "meshref") {
- const int id = ReadIndexFromText();
+ const unsigned int id = static_cast<unsigned int>( ReadIndexFromText() );
std::multimap<unsigned int, aiMesh*>::iterator it = scope.meshes.find(id), end = scope.meshes.end();
if (it == end) {
Deleted: branches/soc-2012-bratwurst/extern/assimp/code/makefile.mingw
===================================================================
--- branches/soc-2012-bratwurst/extern/assimp/code/makefile.mingw 2012-07-07 22:51:57 UTC (rev 48715)
+++ branches/soc-2012-bratwurst/extern/assimp/code/makefile.mingw 2012-07-07 23:32:44 UTC (rev 48716)
@@ -1,105 +0,0 @@
-### USE OF THIS MAKEFILE IS NOT RECOMMENDED.
-### It is no longer maintained. Use CMAKE instead.
-
-# ---------------------------------------------------------------------------
-# Makefile for Open Asset Import Library (MinGW32-make)
-# aramis_acg at users.sourceforge.net
-# - just a quick'n'dirty one, could be buggy ...
-#
-# Usage: mingw32-make -f makefile.mingw <target> <macros>
-
-# TARGETS:
-# all Build a shared so from the whole library
-# clean Cleanup object files, prepare for rebuild
-# static Build a static library (*.a)
-
-# MACROS: (make clean before you change one)
-# NOBOOST=1 Build against boost workaround
-# SINGLETHREADED=1 Build single-threaded library
-# DEBUG=1 Build debug build of library
-#
-# ---------------------------------------------------------------------------
-
-# C++ object files
-OBJECTS := $(patsubst %.cpp,%.o, $(wildcard *.cpp))
-OBJECTS += $(patsubst %.cpp,%.o, $(wildcard extra/*.cpp))
-OBJECTS += $(patsubst %.cpp,%.o, $(wildcard ./../contrib/irrXML/*.cpp))
-
-# C object files
-OBJECTSC := $(patsubst %.c,%.oc, $(wildcard ./../contrib/zlib/*.c))
-OBJECTSC += $(patsubst %.c,%.oc, $(wildcard ./../contrib/ConvertUTF/*.c))
-OBJECTSC += $(patsubst %.c,%.oc, $(wildcard ./../contrib/unzip/*.c))
-
-# Include flags for gcc
-INCLUDEFLAGS =
-
-# Preprocessor defines for gcc
-DEFINEFLAGS =
-
-# Suffix for the output binary, represents build type
-NAMESUFFIX =
-
-# Output path for binaries
-BINPATH = ../bin/mingw/
-
-# GCC compiler flags
-CPPFLAGS=-Wall
-
-# Setup environment for noboost build
-ifeq ($(NOBOOST),1)
- SINGLETHREADED = 1
- INCLUDEFLAGS += -I./BoostWorkaround/
- DEFINEFLAGS += -DASSIMP_BUILD_BOOST_WORKAROUND
-# NAMESUFFIX += -noboost
-else
- # adjust this manually if your boost is stored elsewhere
- INCLUDEFLAGS += -I"C:/Program Files/boost/boost_1_38"
- #INCLUDEFLAGS += -I"$(BOOST_DIR)"
-
-endif
-
-# Setup environment for st build
-ifeq ($(SINGLETHREADED),1)
- DEFINEFLAGS += -DASSIMP_BUILD_SINGLETHREADED
-# NAMESUFFIX += -st
-endif
-
-# Setup environment for debug build
-ifeq ($(DEBUG),1)
- DEFINEFLAGS += -D_DEBUG -DDEBUG
- CPPFLAGS += -g
-# NAMESUFFIX += -debug
-else
- CPPFLAGS += -O2 -s
- DEFINEFLAGS += -DNDEBUG -D_NDEBUG
-endif
-
-# Output name of shared library
-SHARED_TARGET = $(BINPATH)/libassimp$(NAMESUFFIX).so
-
-# Output name of static library
-STATIC = $(BINPATH)/libassimp$(NAMESUFFIX).a
-
-# target: all
-# usage : build a shared library (*.so)
-all: $(SHARED_TARGET)
-
-$(SHARED_TARGET): $(OBJECTS) $(OBJECTSC)
- gcc -o $@ $(OBJECTS) $(OBJECTSC) -shared -lstdc++
-%.o:%.cpp
- $(CXX) -c $(CPPFLAGS) $? -o $@ $(INCLUDEFLAGS) $(DEFINEFLAGS)
-%.oc:%.c
- $(CXX) -x c -c -ansi $(CPPFLAGS) $? -o $@
-
-# target: clean
-# usage : cleanup all object files, prepare for a rebuild
-.PHONY: clean
-clean:
- -del *.o .\..\contrib\irrXML\*.o .\..\contrib\zlib\*.oc .\..\contrib\unzip\*.oc .\..\contrib\ConvertUTF\*.oc
-
-# target: static
-# usage : build a static library (*.a)
-static: $(STATIC)
-$(STATIC): $(OBJECTS) $(OBJECTSC)
- ar rcs $@ $(OBJECTS) $(OBJECTSC)
-
Modified: branches/soc-2012-bratwurst/extern/assimp/contrib/poly2tri/poly2tri/common/shapes.cc
===================================================================
--- branches/soc-2012-bratwurst/extern/assimp/contrib/poly2tri/poly2tri/common/shapes.cc 2012-07-07 22:51:57 UTC (rev 48715)
+++ branches/soc-2012-bratwurst/extern/assimp/contrib/poly2tri/poly2tri/common/shapes.cc 2012-07-07 23:32:44 UTC (rev 48716)
@@ -119,10 +119,10 @@
Point* Triangle::OppositePoint(Triangle& t, Point& p)
{
Point *cw = t.PointCW(p);
- double x = cw->x;
- double y = cw->y;
- x = p.x;
- y = p.y;
+ //double x = cw->x;
+ //double y = cw->y;
+ //x = p.x;
+ //y = p.y;
return PointCW(*cw);
}
Modified: branches/soc-2012-bratwurst/extern/assimp/contrib/poly2tri/poly2tri/sweep/sweep.cc
===================================================================
--- branches/soc-2012-bratwurst/extern/assimp/contrib/poly2tri/poly2tri/sweep/sweep.cc 2012-07-07 22:51:57 UTC (rev 48715)
+++ branches/soc-2012-bratwurst/extern/assimp/contrib/poly2tri/poly2tri/sweep/sweep.cc 2012-07-07 23:32:44 UTC (rev 48716)
@@ -754,7 +754,7 @@
Sweep::~Sweep() {
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list