diff options
| author | Nay <dnpd.dd@gmail.com> | 2013-01-04 23:13:21 +0000 |
|---|---|---|
| committer | Nay <dnpd.dd@gmail.com> | 2013-01-04 23:14:14 +0000 |
| commit | a509aea659c3c488617fd396489f52dc8c64a3e8 (patch) | |
| tree | 87de8c68bf03311f691c40120dbd59458c457691 /src/tools/vmap4_extractor | |
| parent | e0a5aabaf76359fd6e537ad06d4663924766e9d2 (diff) | |
Core/Misc: Fix a couple of warnings, some of them performance related
Errors were found using Cppcheck, open-source static analysis tool
Diffstat (limited to 'src/tools/vmap4_extractor')
| -rw-r--r-- | src/tools/vmap4_extractor/model.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/tools/vmap4_extractor/model.cpp b/src/tools/vmap4_extractor/model.cpp index 57f9b421dbe..c642f73ccae 100644 --- a/src/tools/vmap4_extractor/model.cpp +++ b/src/tools/vmap4_extractor/model.cpp @@ -77,8 +77,7 @@ bool Model::ConvertToVMAPModel(const char * outfilename) return false; } fwrite(szRawVMAPMagic, 8, 1, output); - uint32 nVertices = 0; - nVertices = header.nBoundingVertices; + uint32 nVertices = header.nBoundingVertices; fwrite(&nVertices, sizeof(int), 1, output); uint32 nofgroups = 1; fwrite(&nofgroups,sizeof(uint32), 1, output); @@ -91,8 +90,7 @@ bool Model::ConvertToVMAPModel(const char * outfilename) wsize = sizeof(branches) + sizeof(uint32) * branches; fwrite(&wsize, sizeof(int), 1, output); fwrite(&branches,sizeof(branches), 1, output); - uint32 nIndexes = 0; - nIndexes = header.nBoundingTriangles; + uint32 nIndexes = header.nBoundingTriangles; fwrite(&nIndexes,sizeof(uint32), 1, output); fwrite("INDX",4, 1, output); wsize = sizeof(uint32) + sizeof(unsigned short) * nIndexes; |
