diff --git a/include/vtu11/vtu11.hpp b/include/vtu11/vtu11.hpp index 32f8ebad5..a00183c96 100644 --- a/include/vtu11/vtu11.hpp +++ b/include/vtu11/vtu11.hpp @@ -1306,6 +1306,7 @@ GHC_INLINE std::error_code make_error_code(portable_error err) } #else switch (err) { + default: case portable_error::none: return std::error_code(); case portable_error::exists: @@ -1735,6 +1736,7 @@ GHC_INLINE void path::postprocess_path_with_format(path::format fmt) #else case path::auto_format: case path::native_format: + default: case path::generic_format: // nothing to do break; @@ -6106,15 +6108,15 @@ namespace vtu11 struct Vtu11UnstructuredMesh { - const std::vector& points_; - const std::vector& connectivity_; - const std::vector& offsets_; - const std::vector& types_; + std::vector& points_; + std::vector& connectivity_; + std::vector& offsets_; + std::vector& types_; - const std::vector& points( ){ return points_; } - const std::vector& connectivity( ){ return connectivity_; } - const std::vector& offsets( ){ return offsets_; } - const std::vector& types( ){ return types_; } + std::vector& points( ){ return points_; } + std::vector& connectivity( ){ return connectivity_; } + std::vector& offsets( ){ return offsets_; } + std::vector& types( ){ return types_; } size_t numberOfPoints( ){ return points_.size( ) / 3; } size_t numberOfCells( ){ return types_.size( ); } @@ -6286,13 +6288,13 @@ inline std::string base64Encode( Iterator begin, Iterator end ) // in steps of 3 for( size_t i = 0; i < rawBytes / 3; ++i ) { - encodeTriplet( { next( ), next( ), next( ) }, 0 ); + encodeTriplet( {{ next( ), next( ), next( ) }}, 0 ); } // cleanup if( it != end ) { - std::array bytes { '\0', '\0', '\0' }; + std::array bytes {{ '\0', '\0', '\0' }}; size_t remainder = static_cast( std::distance( it, end ) ) * size - static_cast( byteIndex ); diff --git a/source/gwb-grid/main.cc b/source/gwb-grid/main.cc index a8b931b31..71b7c1322 100644 --- a/source/gwb-grid/main.cc +++ b/source/gwb-grid/main.cc @@ -118,7 +118,7 @@ void filter_vtu_mesh(int dim, vertex_index_map[src_vid] = dst_vid; for (unsigned int i=0; i<3; ++i) - output_mesh.points().push_back(input_mesh.points()[src_vid*3+i]); + output_mesh.points().emplace_back(input_mesh.points()[src_vid*3+i]); for (unsigned int d=0; d