From 02690a5a4c4c7ea056d4db476bd0608b27e21efd Mon Sep 17 00:00:00 2001
From: Dmitri Naumov <dmitri.naumov@ufz.de>
Date: Tue, 30 Oct 2012 16:45:50 +0100
Subject: [PATCH] Specify default argument of getFileNameFromPath() everywhere.

---
 FileIO/GMSInterface.cpp                           | 2 +-
 FileIO/Legacy/MeshIO.cpp                          | 2 +-
 FileIO/MeshIO/GMSHInterface.cpp                   | 2 +-
 FileIO/RapidXmlIO/RapidVtuInterface.cpp           | 2 +-
 Utils/FileConverter/generateMatPropsFromMatID.cpp | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/FileIO/GMSInterface.cpp b/FileIO/GMSInterface.cpp
index a65c3cd2298..0a100dc0fb5 100644
--- a/FileIO/GMSInterface.cpp
+++ b/FileIO/GMSInterface.cpp
@@ -328,6 +328,6 @@ MeshLib::Mesh* GMSInterface::readGMS3DMMesh(std::string filename)
 	in.close();
 	std::cout << "finished" << std::endl;
 
-	std::string mesh_name (BaseLib::getFileNameFromPath(filename));
+	std::string mesh_name (BaseLib::getFileNameFromPath(filename, false));
 	return new MeshLib::Mesh(mesh_name, nodes, elements);
 }
diff --git a/FileIO/Legacy/MeshIO.cpp b/FileIO/Legacy/MeshIO.cpp
index 0717314aaf0..6c20b1b12cd 100644
--- a/FileIO/Legacy/MeshIO.cpp
+++ b/FileIO/Legacy/MeshIO.cpp
@@ -107,7 +107,7 @@ MeshLib::Mesh* MeshIO::loadMeshFromFile(const std::string& file_name)
 		}
 
 
-		MeshLib::Mesh* mesh (new MeshLib::Mesh(BaseLib::getFileNameFromPath(file_name), nodes, elements));
+		MeshLib::Mesh* mesh (new MeshLib::Mesh(BaseLib::getFileNameFromPath(file_name, false), nodes, elements));
 		mesh->setEdgeLengthRange(sqrt(edge_length[0]), sqrt(edge_length[1]));
 
 		std::cout << "finished." << std::endl;
diff --git a/FileIO/MeshIO/GMSHInterface.cpp b/FileIO/MeshIO/GMSHInterface.cpp
index 7c60bad6f89..3aa6e5cad64 100644
--- a/FileIO/MeshIO/GMSHInterface.cpp
+++ b/FileIO/MeshIO/GMSHInterface.cpp
@@ -211,7 +211,7 @@ MeshLib::Mesh* GMSHInterface::readGMSHMesh(std::string const& fname)
 		}
 	}
 	in.close();
-	return new MeshLib::Mesh(BaseLib::getFileNameFromPath(fname), nodes, elements);
+	return new MeshLib::Mesh(BaseLib::getFileNameFromPath(fname, false), nodes, elements);
 }
 
 void GMSHInterface::readNodeIDs(std::ifstream &in, unsigned n_nodes, std::vector<unsigned> &node_ids, std::map<unsigned, unsigned> &id_map)
diff --git a/FileIO/RapidXmlIO/RapidVtuInterface.cpp b/FileIO/RapidXmlIO/RapidVtuInterface.cpp
index 1dc0bd180c8..65738ea028f 100644
--- a/FileIO/RapidXmlIO/RapidVtuInterface.cpp
+++ b/FileIO/RapidXmlIO/RapidVtuInterface.cpp
@@ -178,7 +178,7 @@ MeshLib::Mesh* RapidVtuInterface::readVTUFile(const std::string &file_name)
 			std::cout << "Nr. Nodes: " << nodes.size() << std::endl;
 			std::cout << "Nr. Elements: " << elements.size() << std::endl;
 			delete [] buffer;
-			return new MeshLib::Mesh(BaseLib::getFileNameFromPath(file_name), nodes, elements);
+			return new MeshLib::Mesh(BaseLib::getFileNameFromPath(file_name, false), nodes, elements);
 		}
 		else {
 			std::cout << "Error in RapidVtuInterface::readVTUFile() - Number of nodes and elements not specified." << std::endl;
diff --git a/Utils/FileConverter/generateMatPropsFromMatID.cpp b/Utils/FileConverter/generateMatPropsFromMatID.cpp
index 1361a6d0891..9a9aec192ef 100644
--- a/Utils/FileConverter/generateMatPropsFromMatID.cpp
+++ b/Utils/FileConverter/generateMatPropsFromMatID.cpp
@@ -28,7 +28,7 @@ int main (int argc, char* argv[])
 
 	// create file
 	std::string filename(argv[1]);
-	std::string name(BaseLib::getFileNameFromPath(filename));
+	std::string name(BaseLib::getFileNameFromPath(filename, false));
 
 	std::string new_matname(name + "_prop");
 	std::ofstream out_prop( new_matname.c_str(), std::ios::out );
-- 
GitLab