summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/assimp/code/LWOLoader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/assimp/code/LWOLoader.cpp')
-rw-r--r--src/3rdparty/assimp/code/LWOLoader.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/3rdparty/assimp/code/LWOLoader.cpp b/src/3rdparty/assimp/code/LWOLoader.cpp
index 222ec8e2c..5ec07800d 100644
--- a/src/3rdparty/assimp/code/LWOLoader.cpp
+++ b/src/3rdparty/assimp/code/LWOLoader.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2016, assimp team
+Copyright (c) 2006-2017, assimp team
+
All rights reserved.
@@ -54,10 +55,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "ProcessHelper.h"
#include "ConvertToLHProcess.h"
#include <assimp/IOSystem.hpp>
+#include <assimp/importerdesc.h>
#include <memory>
#include <sstream>
#include <iomanip>
-
+#include <map>
using namespace Assimp;
@@ -65,7 +67,7 @@ static const aiImporterDesc desc = {
"LightWave/Modo Object Importer",
"",
"",
- "http://www.newtek.com/lightwave.html\nhttp://www.luxology.com/modo/",
+ "https://www.lightwave3d.com/lightwave_sdk/",
aiImporterFlags_SupportTextFlavour,
0,
0,
@@ -426,7 +428,7 @@ void LWOImporter::InternReadFile( const std::string& pFile,
}
// Generate nodes to render the mesh. Store the source layer in the mParent member of the nodes
- unsigned int num = apcMeshes.size() - meshStart;
+ unsigned int num = static_cast<unsigned int>(apcMeshes.size() - meshStart);
if (layer.mName != "<LWODefault>" || num > 0) {
aiNode* pcNode = new aiNode();
apcNodes[layer.mIndex] = pcNode;
@@ -781,7 +783,7 @@ void LWOImporter::LoadLWO2Polygons(unsigned int length)
// Determine the type of the polygons
switch (type)
{
- // read unsupported stuff too (although we wont process it)
+ // read unsupported stuff too (although we won't process it)
case AI_LWO_MBAL:
DefaultLogger::get()->warn("LWO2: Encountered unsupported primitive chunk (METABALL)");
break;
@@ -1058,8 +1060,6 @@ void LWOImporter::LoadLWO2VertexMap(unsigned int length, bool perPoly)
LWO::PointList& pointList = mCurLayer->mTempPoints;
LWO::ReferrerList& refList = mCurLayer->mPointReferrers;
- float temp[4];
-
const unsigned int numPoints = (unsigned int)pointList.size();
const unsigned int numFaces = (unsigned int)list.size();
@@ -1123,10 +1123,12 @@ void LWOImporter::LoadLWO2VertexMap(unsigned int length, bool perPoly)
}
}
}
+
+ std::unique_ptr<float[]> temp(new float[type]);
for (unsigned int l = 0; l < type;++l)
temp[l] = GetF4();
- DoRecursiveVMAPAssignment(base,type,idx, temp);
+ DoRecursiveVMAPAssignment(base,type,idx, temp.get());
mFileBuffer += diff;
}
}