diff --git a/Applications/DataExplorer/DataView/DiagramView/DiagramList.cpp b/Applications/DataExplorer/DataView/DiagramView/DiagramList.cpp index fe747dc0bcb9c2202068ad1ef6baddb18eab76da..fad4cbaef2d3b9a96726cb7e72afc16040edbb25 100644 --- a/Applications/DataExplorer/DataView/DiagramView/DiagramList.cpp +++ b/Applications/DataExplorer/DataView/DiagramView/DiagramList.cpp @@ -34,7 +34,9 @@ float DiagramList::calcMinXValue() _coords.begin(), _coords.end(), [](auto const& c0, auto const& c1) { return c0.first < c1.first; }); if (min != _coords.end()) + { return min->first; + } return std::numeric_limits<float>::max(); } diff --git a/Applications/FileIO/GocadIO/GocadAsciiReader.cpp b/Applications/FileIO/GocadIO/GocadAsciiReader.cpp index 447745b7900388b55ab79f9468cb952fa6de1d54..cecdd4db3783e03fe41ae73374123c911bae2839 100644 --- a/Applications/FileIO/GocadIO/GocadAsciiReader.cpp +++ b/Applications/FileIO/GocadIO/GocadAsciiReader.cpp @@ -537,7 +537,9 @@ MeshLib::Mesh* createMesh(std::ifstream& in, DataType type, return_val = parser(in, nodes, elems, node_id_map, mesh_prop); if (return_val) + { return new MeshLib::Mesh(mesh_name, nodes, elems, mesh_prop); + } ERR("Error parsing %s %s.", dataType2ShortString(type).c_str(), mesh_name.c_str()); clearData(nodes, elems); diff --git a/Applications/Utils/FileConverter/GocadTSurfaceReader.cpp b/Applications/Utils/FileConverter/GocadTSurfaceReader.cpp index 0aa14a89fedc50bc70a6330f6f81ab605937a308..710ab57b6a951dedefdd0008b665e88bb94d5481 100644 --- a/Applications/Utils/FileConverter/GocadTSurfaceReader.cpp +++ b/Applications/Utils/FileConverter/GocadTSurfaceReader.cpp @@ -74,9 +74,13 @@ int main(int argc, char* argv[]) FileIO::Gocad::DataType t(FileIO::Gocad::DataType::ALL); if (export_lines_arg.isSet()) + { t = FileIO::Gocad::DataType::PLINE; + } if (export_surfaces_arg.isSet()) + { t = FileIO::Gocad::DataType::TSURF; + } std::vector<std::unique_ptr<MeshLib::Mesh>> meshes; if (!FileIO::Gocad::GocadAsciiReader::readFile(file_name, meshes, t)) { @@ -90,7 +94,9 @@ int main(int argc, char* argv[]) for (auto& mesh : meshes) { if (mesh == nullptr) + { continue; + } INFO("Writing mesh \"%s\"", mesh->getName().c_str()); int data_mode = (write_binary) ? 2 : 0; bool compressed = (write_binary); diff --git a/Applications/Utils/FileConverter/Mesh2Shape.cpp b/Applications/Utils/FileConverter/Mesh2Shape.cpp index 8fda2f7fccfb4aaadd177e917b1ffa3594aa6c3b..8abff7ec43a3ce701f81d31b2fc8120946f0b06c 100644 --- a/Applications/Utils/FileConverter/Mesh2Shape.cpp +++ b/Applications/Utils/FileConverter/Mesh2Shape.cpp @@ -46,6 +46,8 @@ int main(int argc, char* argv[]) std::unique_ptr<MeshLib::Mesh> const mesh( MeshLib::IO::readMeshFromFile(file_name)); if (FileIO::SHPInterface::write2dMeshToSHP(output_arg.getValue(), *mesh)) + { return EXIT_SUCCESS; + } return EXIT_FAILURE; } diff --git a/Applications/Utils/MeshGeoTools/createIntermediateRasters.cpp b/Applications/Utils/MeshGeoTools/createIntermediateRasters.cpp index 4d78b426d6fb31fb9014352679b42ccbc36460a0..7f58c41846e389a49c952e39133e06b8c6dbd623 100644 --- a/Applications/Utils/MeshGeoTools/createIntermediateRasters.cpp +++ b/Applications/Utils/MeshGeoTools/createIntermediateRasters.cpp @@ -56,7 +56,9 @@ int main(int argc, char* argv[]) FileIO::AsciiRasterInterface::readRaster(input2_arg.getValue())); if (dem1 == nullptr || dem2 == nullptr) + { return 1; + } GeoLib::RasterHeader const& h1 = dem1->getHeader(); GeoLib::RasterHeader const& h2 = dem2->getHeader(); @@ -89,7 +91,9 @@ int main(int argc, char* argv[]) } if (errors_found) + { return 2; + } std::size_t const n = number_arg.getValue(); std::vector<std::vector<double>> raster; @@ -111,7 +115,9 @@ int main(int argc, char* argv[]) if (*it1 == h1.no_data || *it2 == h2.no_data) { for (std::size_t i = 0; i < n; ++i) + { raster[i].push_back(h1.no_data); + } } else { @@ -119,7 +125,9 @@ int main(int argc, char* argv[]) double const max = std::max(*it1, *it2); double const step = (max - min) / static_cast<double>(n + 1); for (std::size_t i = 0; i < n; ++i) + { raster[i].push_back(min + ((i+1) * step)); + } } it2++; } diff --git a/MaterialLib/Fluid/FluidType/FluidType.cpp b/MaterialLib/Fluid/FluidType/FluidType.cpp index 2faf9aa782893dbc168a645c3e6cd87c9138cf40..2279f2c43211ab187ec71eaea2e5a6b0d9582d11 100644 --- a/MaterialLib/Fluid/FluidType/FluidType.cpp +++ b/MaterialLib/Fluid/FluidType/FluidType.cpp @@ -17,11 +17,17 @@ namespace FluidType Fluid_Type strToFluidType(std::string const& s) { if (s == "incompressible_fluid") + { return Fluid_Type::INCOMPRESSIBLE_FLUID; + } if (s == "compressible_fluid") + { return Fluid_Type::COMPRESSIBLE_FLUID; + } if (s == "ideal_gas") + { return Fluid_Type::IDEAL_GAS; + } OGS_FATAL("This fluid type is unavailable. The available types are \n" "incompressible_fluid, compressible_fluid and ideal_gas.\n"); } diff --git a/ProcessLib/ThermoMechanics/ThermoMechanicsProcess.cpp b/ProcessLib/ThermoMechanics/ThermoMechanicsProcess.cpp index 444684c24585ad9d60c6df9d68e2786774ee3617..125fc0ca4a138548442d76959c9c0b061537cf53 100644 --- a/ProcessLib/ThermoMechanics/ThermoMechanicsProcess.cpp +++ b/ProcessLib/ThermoMechanics/ThermoMechanicsProcess.cpp @@ -433,7 +433,9 @@ void ThermoMechanicsProcess<DisplacementDim>::postTimestepConcreteProcess( int const process_id) { if (process_id != _process_data.mechanics_process_id) + { return; + } DBUG("PostTimestep ThermoMechanicsProcess.");