diff --git a/Applications/FileIO/GocadIO/GocadAsciiReader.cpp b/Applications/FileIO/GocadIO/GocadAsciiReader.cpp index 55eebbc24755f31a83fe57e67654a3379d0b07a2..e98d0404027294480785d452642afff5a81a40b3 100644 --- a/Applications/FileIO/GocadIO/GocadAsciiReader.cpp +++ b/Applications/FileIO/GocadIO/GocadAsciiReader.cpp @@ -13,10 +13,6 @@ #include <fstream> -#include <boost/uuid/uuid.hpp> -#include <boost/uuid/uuid_generators.hpp> -#include <boost/uuid/uuid_io.hpp> - #include "Applications/FileIO/GocadIO/CoordinateSystem.h" #include "BaseLib/FileTools.h" #include "BaseLib/StringTools.h" @@ -44,18 +40,16 @@ GocadAsciiReader::GocadAsciiReader(GocadDataType const t) /// another dataset with the same name exists. void checkMeshNames(std::vector<std::unique_ptr<MeshLib::Mesh>> const& meshes) { - boost::uuids::random_generator generator; std::size_t const n_meshes = meshes.size(); for (std::size_t i=0; i<n_meshes; ++i) { - std::string name = meshes[i]->getName(); + std::string const& name = meshes[i]->getName(); for (std::size_t j=i+1; j<n_meshes; ++j) { if (meshes[j]->getName() == name) { - boost::uuids::uuid mesh_id = generator(); - std::string id_str = boost::lexical_cast<std::string>(mesh_id); - meshes[i]->setName(name + "--" + id_str); + std::string const id_str = std::to_string(meshes[j]->getID()); + meshes[i]->setName(name + "--importID-" + id_str); break; } } diff --git a/Applications/FileIO/GocadIO/GocadAsciiReader.h b/Applications/FileIO/GocadIO/GocadAsciiReader.h index be2de9ecea6d12e48fda2fdd228d2f2249879f8b..a4958668ded1e2eb8326de9bfdbaac6462ff7cb1 100644 --- a/Applications/FileIO/GocadIO/GocadAsciiReader.h +++ b/Applications/FileIO/GocadIO/GocadAsciiReader.h @@ -45,11 +45,6 @@ public: /// Constructor taking a specific data type (will only export that type) explicit GocadAsciiReader(GocadDataType const t); - GocadAsciiReader(GocadAsciiReader&& src) = delete; - GocadAsciiReader(GocadAsciiReader const& src) = delete; - GocadAsciiReader& operator=(GocadAsciiReader&& rhs) = delete; - GocadAsciiReader& operator=(GocadAsciiReader const& rhs) = delete; - /// Reads the specified file and writes data into internal mesh vector bool readFile(std::string const& file_name, std::vector<std::unique_ptr<MeshLib::Mesh>>& meshes); diff --git a/Applications/Utils/FileConverter/GocadTSurfaceReader.cpp b/Applications/Utils/FileConverter/GocadTSurfaceReader.cpp index bb09d45f7e38682a41b6c63bd351b589b0518012..9f857412733844ca9b8bc2a5a471bc83943c2e43 100644 --- a/Applications/Utils/FileConverter/GocadTSurfaceReader.cpp +++ b/Applications/Utils/FileConverter/GocadTSurfaceReader.cpp @@ -71,11 +71,11 @@ int main(int argc, char* argv[]) std::string const file_name (input_arg.getValue()); - FileIO::Gocad::GOCAD_DATA_TYPE t (FileIO::Gocad::GOCAD_DATA_TYPE::ALL); + FileIO::Gocad::GocadDataType t(FileIO::Gocad::GocadDataType::ALL); if (export_lines_arg.isSet()) - t = FileIO::Gocad::GOCAD_DATA_TYPE::PLINE; + t = FileIO::Gocad::GocadDataType::PLINE; if (export_surfaces_arg.isSet()) - t = FileIO::Gocad::GOCAD_DATA_TYPE::TSURF; + t = FileIO::Gocad::GocadDataType::TSURF; FileIO::Gocad::GocadAsciiReader gcts(t); std::vector<std::unique_ptr<MeshLib::Mesh>> meshes; if (!gcts.readFile(file_name, meshes))