Explorar o código

Merge branch 'master' into coverity_scan

Kim Kulling %!s(int64=8) %!d(string=hai) anos
pai
achega
9e07701f3e
Modificáronse 6 ficheiros con 28 adicións e 15 borrados
  1. 2 1
      .travis.yml
  2. 1 1
      code/AMFImporter_Postprocess.cpp
  3. 12 0
      code/CMakeLists.txt
  4. 1 1
      code/STLLoader.cpp
  5. 1 1
      include/assimp/material.h
  6. 11 11
      test/CMakeLists.txt

+ 2 - 1
.travis.yml

@@ -50,4 +50,5 @@ after_success:
   - lcov --directory . --capture --output-file coverage.info
   - lcov --directory . --capture --output-file coverage.info
   - lcov --remove coverage.info '/usr/*' 'contrib/*' 'test/*' --output-file coverage.info
   - lcov --remove coverage.info '/usr/*' 'contrib/*' 'test/*' --output-file coverage.info
   - lcov --list coverage.info
   - lcov --list coverage.info
-  - coveralls-lcov --repo-token=${COVERALLS_TOKEN} coverage.info
+  - coveralls-lcov --source-encoding=ISO-8859-1 --repo-token=${COVERALLS_TOKEN} coverage.info
+

+ 1 - 1
code/AMFImporter_Postprocess.cpp

@@ -352,7 +352,7 @@ void AMFImporter::Postprocess_AddMetadata(const std::list<CAMFImporter_NodeEleme
 
 
 		for(const CAMFImporter_NodeElement_Metadata& metadata: pMetadataList)
 		for(const CAMFImporter_NodeElement_Metadata& metadata: pMetadataList)
 		{
 		{
-			pSceneNode.mMetaData->Set(meta_idx++, metadata.Type, metadata.Value.c_str());
+			pSceneNode.mMetaData->Set(meta_idx++, metadata.Type, aiString(metadata.Value));
 		}
 		}
 	}// if(pMetadataList.size() > 0)
 	}// if(pMetadataList.size() > 0)
 }
 }

+ 12 - 0
code/CMakeLists.txt

@@ -928,3 +928,15 @@ if(MSVC AND ASSIMP_INSTALL_PDB)
     CONFIGURATIONS RelWithDebInfo
     CONFIGURATIONS RelWithDebInfo
   )
   )
 endif ()
 endif ()
+
+if (ASSIMP_COVERALLS)
+    include(Coveralls)
+
+    set(COVERAGE_SRCS ${assimp_src} ${TEST_SRCS} )
+
+    # Create the coveralls target.
+    coveralls_setup(
+        "${COVERAGE_SRCS}" # The source files.
+        ON                 # If we should upload.
+        "${PROJECT_SOURCE_DIR}/cmake-modules/") # (Optional) Alternate project cmake module path.
+endif()

+ 1 - 1
code/STLLoader.cpp

@@ -274,7 +274,7 @@ void STLImporter::LoadASCIIFile()
         }
         }
         else pScene->mRootNode->mName.Set("<STL_ASCII>");
         else pScene->mRootNode->mName.Set("<STL_ASCII>");
 
 
-        unsigned int faceVertexCounter = 0;
+        unsigned int faceVertexCounter = 3;
         for ( ;; )
         for ( ;; )
         {
         {
             // go to the next token
             // go to the next token

+ 1 - 1
include/assimp/material.h

@@ -413,7 +413,7 @@ enum aiTextureFlags
  *    SourceColor * SourceBlend + DestColor * DestBlend
  *    SourceColor * SourceBlend + DestColor * DestBlend
  *  @endcode
  *  @endcode
  *  where DestColor is the previous color in the framebuffer at this
  *  where DestColor is the previous color in the framebuffer at this
- *  position and SourceColor is the material colro before the transparency
+ *  position and SourceColor is the material color before the transparency
  *  calculation.<br>
  *  calculation.<br>
  *  This corresponds to the #AI_MATKEY_BLEND_FUNC property.
  *  This corresponds to the #AI_MATKEY_BLEND_FUNC property.
 */
 */

+ 11 - 11
test/CMakeLists.txt

@@ -122,15 +122,15 @@ ENDIF( WIN32 )
 target_link_libraries( unit assimp ${platform_libs} )
 target_link_libraries( unit assimp ${platform_libs} )
 
 
 add_subdirectory(headercheck)
 add_subdirectory(headercheck)
-if (ASSIMP_COVERALLS)
-    include(Coveralls)
-
-    set(COVERAGE_SRCS ${assimp_src} ${TEST_SRCS} )
-
-    # Create the coveralls target.
-    coveralls_setup(
-        "${COVERAGE_SRCS}" # The source files.
-        ON                 # If we should upload.
-        "${PROJECT_SOURCE_DIR}/cmake-modules/") # (Optional) Alternate project cmake module path.
-endif()
+#if (ASSIMP_COVERALLS)
+#    include(Coveralls)
+#
+#    set(COVERAGE_SRCS ${assimp_src} ${TEST_SRCS} )
+#
+#    # Create the coveralls target.
+#    coveralls_setup(
+#        "${COVERAGE_SRCS}" # The source files.
+#        ON                 # If we should upload.
+#        "${PROJECT_SOURCE_DIR}/cmake-modules/") # (Optional) Alternate project cmake module path.
+#endif()