From f1001ce711c00b7fbaade9b1ab7ca654f6acee25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Fri, 14 Dec 2018 14:27:50 +0100 Subject: [PATCH 1/2] Fixed uninitialized warnings --- src/OpenMesh/Core/IO/reader/OMReader.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/OpenMesh/Core/IO/reader/OMReader.cc b/src/OpenMesh/Core/IO/reader/OMReader.cc index ca4655dd..3fac9888 100644 --- a/src/OpenMesh/Core/IO/reader/OMReader.cc +++ b/src/OpenMesh/Core/IO/reader/OMReader.cc @@ -380,7 +380,7 @@ bool _OMReader_::read_binary_vertex_chunk(std::istream &_is, BaseImporter &_bi, { for (; vidx < header_.n_vertices_; ++vidx) { - int halfedge_id; + int halfedge_id = 0; bytes_ += restore( _is, halfedge_id, OMFormat::Chunk::Integer_Size(chunk_header_.bits_), _swap ); _bi.set_halfedge(VertexHandle(static_cast(vidx)), HalfedgeHandle(halfedge_id)); @@ -454,7 +454,7 @@ bool _OMReader_::read_binary_face_chunk(std::istream &_is, BaseImporter &_bi, Op // add faces by simply setting an incident halfedge for (; fidx < header_.n_faces_; ++fidx) { - int halfedge_id; + int halfedge_id = 0; bytes_ += restore( _is, halfedge_id, OMFormat::Chunk::Integer_Size(chunk_header_.bits_), _swap ); _bi.add_face(HalfedgeHandle(halfedge_id)); @@ -585,16 +585,16 @@ bool _OMReader_::read_binary_halfedge_chunk(std::istream &_is, BaseImporter &_bi std::vector next_halfedges; for (size_t e_idx = 0; e_idx < header_.n_edges_; ++e_idx) { - int next_id_0; - int to_vertex_id_0; - int face_id_0; + int next_id_0 = -1; + int to_vertex_id_0 = -1; + int face_id_0 = -1; bytes_ += restore( _is, next_id_0, OMFormat::Chunk::Integer_Size(chunk_header_.bits_), _swap ); bytes_ += restore( _is, to_vertex_id_0, OMFormat::Chunk::Integer_Size(chunk_header_.bits_), _swap ); bytes_ += restore( _is, face_id_0, OMFormat::Chunk::Integer_Size(chunk_header_.bits_), _swap ); - int next_id_1; - int to_vertex_id_1; - int face_id_1; + int next_id_1 = -1; + int to_vertex_id_1 = -1; + int face_id_1 = -1; bytes_ += restore( _is, next_id_1, OMFormat::Chunk::Integer_Size(chunk_header_.bits_), _swap ); bytes_ += restore( _is, to_vertex_id_1, OMFormat::Chunk::Integer_Size(chunk_header_.bits_), _swap ); bytes_ += restore( _is, face_id_1, OMFormat::Chunk::Integer_Size(chunk_header_.bits_), _swap ); From 44bfe825bbbc459933380be9a94a36bf07613cd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Fri, 14 Dec 2018 14:28:14 +0100 Subject: [PATCH 2/2] Removed unnecessary function --- cmake/ACGQt.cmake | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/cmake/ACGQt.cmake b/cmake/ACGQt.cmake index c5c6a5a9..d2af17df 100644 --- a/cmake/ACGQt.cmake +++ b/cmake/ACGQt.cmake @@ -1,15 +1,3 @@ -#unset cached qt variables which are set by all qt versions. version is the major number of the qt version (e.g. 4 or 5, not 4.8) -macro (acg_unset_qt_shared_variables version) - if (ACG_INTERNAL_QT_LAST_VERSION) - if (NOT ${ACG_INTERNAL_QT_LAST_VERSION} EQUAL ${version}) - unset(QT_BINARY_DIR) - unset(QT_PLUGINS_DIR) - unset(ACG_INTERNAL_QT_LAST_VERSION) - endif() - endif() - set (ACG_INTERNAL_QT_LAST_VERSION "${version}" CACHE INTERNAL "Qt Version, which was used on the last time") -endmacro() - macro (acg_qt5) if(POLICY CMP0020) @@ -63,8 +51,7 @@ macro (acg_qt5) endif(Qt5Core_FOUND) if (QT5_FOUND) - acg_unset_qt_shared_variables(5) - + #set plugin dir list(GET Qt5Gui_PLUGINS 0 _plugin) if (_plugin)