diff --git a/Applications/FileIO/SWMM/SWMMInterface.h b/Applications/FileIO/SWMM/SWMMInterface.h index da001e9d810d6bd123701f4736748e6dfbd00976..e656c7f44b5c0bf54c79adc6e742948c6113a019 100644 --- a/Applications/FileIO/SWMM/SWMMInterface.h +++ b/Applications/FileIO/SWMM/SWMMInterface.h @@ -70,7 +70,7 @@ public: std::string const& vec_name, std::vector<double> const& data); /// Returns the mesh generated from SWMM file content. - MeshLib::Mesh const& getMesh() const { return *_mesh; } + MeshLib::Mesh& getMesh() const { return *_mesh; } /// Returns the name of the data array for the given object type and parameter index. std::string getArrayName(SwmmObject obj_type, std::size_t var_idx) const; diff --git a/Applications/Utils/SWMMConverter/SWMMConverter.cpp b/Applications/Utils/SWMMConverter/SWMMConverter.cpp index 8515288a88038d3e06ca079a07dc612e506e3375..1689da9bcf0ce89ddc13a5cda3238c5adac7c95f 100644 --- a/Applications/Utils/SWMMConverter/SWMMConverter.cpp +++ b/Applications/Utils/SWMMConverter/SWMMConverter.cpp @@ -55,12 +55,11 @@ int addObjectsToMesh(FileIO::SwmmInterface &swmm, MeshLib::Mesh &mesh, int writeMeshOutput(std::string const& input_file, std::string const& output_file, bool const node_args, bool const link_args) { - std::unique_ptr<FileIO::SwmmInterface> swmm = nullptr; - swmm = FileIO::SwmmInterface::create(input_file); + std::unique_ptr<FileIO::SwmmInterface> swmm = FileIO::SwmmInterface::create(input_file); if (swmm == nullptr) return -1; - MeshLib::Mesh mesh = swmm->getMesh(); + MeshLib::Mesh& mesh = swmm->getMesh(); bool const no_output_file = !swmm->existsSwmmOutputFile(); if (!(node_args || link_args) || no_output_file) @@ -106,8 +105,7 @@ void writeObjectsOfSwmmTypeToCsv(FileIO::SwmmInterface &swmm, FileIO::SwmmObject int writeCsvOutput(std::string input_file, std::string output_file, bool const node_args, bool const link_args, bool const catchment_args, bool const system_args) { - std::unique_ptr<FileIO::SwmmInterface> swmm = nullptr; - swmm = FileIO::SwmmInterface::create(input_file); + std::unique_ptr<FileIO::SwmmInterface> swmm = FileIO::SwmmInterface::create(input_file); if (swmm == nullptr) return -1;