diff --git a/Applications/FileIO/SWMM/SWMMInterface.cpp b/Applications/FileIO/SWMM/SWMMInterface.cpp index 90672643ec24305ee2318a51ad0885aa5af26637..467c3f7552aaca532effc9e72bc799f190d355aa 100644 --- a/Applications/FileIO/SWMM/SWMMInterface.cpp +++ b/Applications/FileIO/SWMM/SWMMInterface.cpp @@ -83,7 +83,7 @@ std::array<std::size_t,4> const n_obj_params = { 8, 6, 5, 15 }; SwmmInterface* SwmmInterface::create(std::string const& file_name) { - if (file_name.length() < 5) + if (file_name.length() < 5) return nullptr; if (!(SwmmInterface::isSwmmInputFile(file_name) || SwmmInterface::isSwmmOutputFile(file_name))) @@ -174,7 +174,6 @@ bool SwmmInterface::isSwmmOutputFile(std::string const& out_file_name) ERR ("SWMMInterface: Could not open input file %s.", out_file_name.c_str()); return false; } - in.close(); return true; } @@ -876,7 +875,7 @@ std::size_t SwmmInterface::getNTimeSteps() const return n_time_steps; } -bool SwmmInterface::addResultsToMesh(MeshLib::Mesh &mesh, SwmmObject const swmm_type, +bool SwmmInterface::addResultsToMesh(MeshLib::Mesh &mesh, SwmmObject const swmm_type, std::string const& vec_name, std::vector<double> const& data) { if (!(swmm_type == SwmmObject::NODE) || (swmm_type == SwmmObject::LINK)) @@ -971,7 +970,7 @@ std::vector<double> SwmmInterface::getArrayAtTimeStep(SwmmObject obj_type, std:: return data; } - INFO ("Fetching \"%s\"-data for time step %d...", + INFO ("Fetching \"%s\"-data for time step %d...", getArrayName(obj_type, var_idx, SWMM_Npolluts).c_str(), time_step); for (std::size_t i=0; i<n_objects; ++i) diff --git a/Applications/FileIO/SWMM/SWMMInterface.h b/Applications/FileIO/SWMM/SWMMInterface.h index 232e3694adebb43dd6b2e62e0140f2dea25b5316..d5d3a6e23da6d11ff4c644f956a8c128891952da 100644 --- a/Applications/FileIO/SWMM/SWMMInterface.h +++ b/Applications/FileIO/SWMM/SWMMInterface.h @@ -54,7 +54,7 @@ enum class SwmmObject * number of nodes, links or subcatchments but only ever one system. * The interface can convert the SWMM input data into a geometry or a (line-)mesh. * For meshes, also output data can be added to nodes and elements. - * The interface also provides routines for returning data as vectors as well as convenience + * The interface also provides routines for returning data as vectors as well as convenience * methods for outputting data into CSV files. CSV files will either contain all parameters for one * object at all time steps or all parameters for all objects of a given type at one timestep. */ diff --git a/BaseLib/StringTools.h b/BaseLib/StringTools.h index 64ad1be519257df8ce9fecb1fe4de1c9497f3ea4..c8ff50b63f9e3921f6ee302b8e46ad28bc357368 100644 --- a/BaseLib/StringTools.h +++ b/BaseLib/StringTools.h @@ -24,7 +24,7 @@ namespace BaseLib { /** - * Splits a string into a vector of strings. This method only works for string seperation + * Splits a string into a vector of strings. This method only works for string seperation * recognised by the std::stringstream iterator such as ' ' or '\t'. * \param str String to be splitted * \return Vector of strings