Static code analysis: fix minor finding.

pull/929/head
Kim Kulling 2016-06-28 11:25:04 +02:00
parent 9b6de15b74
commit 5321072007
3 changed files with 6 additions and 5 deletions

View File

@ -530,7 +530,7 @@ void ColladaExporter::ReadMaterialSurface( Surface& poSurface, const aiMaterial*
// Reimplementation of isalnum(,C locale), because AppVeyor does not see standard version. // Reimplementation of isalnum(,C locale), because AppVeyor does not see standard version.
static bool isalnum_C(char c) static bool isalnum_C(char c)
{ {
return strchr("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",c); return ( nullptr != strchr("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",c) );
} }
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------

View File

@ -83,6 +83,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif #endif
template <typename T> template <typename T>
inline
std::string to_string( T value ) { std::string to_string( T value ) {
std::ostringstream os; std::ostringstream os;
os << value; os << value;

View File

@ -90,9 +90,9 @@ TEST_F( utIssues, OpacityBugWhenExporting_727 ) {
Assimp::Importer importer; Assimp::Importer importer;
Assimp::Exporter exporter; Assimp::Exporter exporter;
for ( std::size_t i( 0 ); i < exporter.GetExportFormatCount(); ++i ) { for ( std::size_t i( 0 ); i < exporter.GetExportFormatCount(); ++i ) {
/*const aiExportFormatDesc *desc( exporter.GetExportFormatDescription( i ) ); std::string path;
std::cout << "[" << desc->id << "] "; const aiExportFormatDesc *desc( exporter.GetExportFormatDescription( i ) );
std::string path( "scene." ); EXPECT_NE( desc, nullptr );
path.append( desc->fileExtension ); path.append( desc->fileExtension );
ASSERT_EQ( AI_SUCCESS, exporter.Export( scene, desc->id, path ) ); ASSERT_EQ( AI_SUCCESS, exporter.Export( scene, desc->id, path ) );
@ -102,7 +102,7 @@ TEST_F( utIssues, OpacityBugWhenExporting_727 ) {
if ( newScene->mNumMaterials > 0 ) { if ( newScene->mNumMaterials > 0 ) {
//ASSERT_EQ( AI_SUCCESS, newScene->mMaterials[ 0 ]->Get( AI_MATKEY_OPACITY, newOpacity ) ); //ASSERT_EQ( AI_SUCCESS, newScene->mMaterials[ 0 ]->Get( AI_MATKEY_OPACITY, newOpacity ) );
//EXPECT_EQ( opacity, newOpacity ); //EXPECT_EQ( opacity, newOpacity );
}*/ }
} }
} }