summaryrefslogtreecommitdiff
path: root/soltools
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2021-10-05 20:33:16 +0200
committerJulien Nabet <serval2412@yahoo.fr>2021-10-05 23:03:52 +0200
commit1f90b8086fcad7ac033e76a96bf102db7c15e44f (patch)
treefc961a40b971a5cce79a4ce9ac9bcde61c3418b6 /soltools
parent3068ab9a2c9307cbea2efa2b6924ce427bb54466 (diff)
drop 'using namespace std' in s* + toolkit
Change-Id: Ibd0b983d46a5683df64b4de79cd444427705e9e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123118 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'soltools')
-rw-r--r--soltools/mkdepend/collectdircontent.cxx28
1 files changed, 13 insertions, 15 deletions
diff --git a/soltools/mkdepend/collectdircontent.cxx b/soltools/mkdepend/collectdircontent.cxx
index 7ea5fa272de9..c5e910c2e7bf 100644
--- a/soltools/mkdepend/collectdircontent.cxx
+++ b/soltools/mkdepend/collectdircontent.cxx
@@ -2,22 +2,20 @@
#include "collectdircontent.hxx"
#include <rtl/character.hxx>
-using namespace std;
-
-PathFilePair IncludesCollection::split_path(const string& filePath) {
- string sepU = "/";
- string sepW = "\\";
- string::size_type pos = filePath.rfind (sepU);
- string::size_type posW = filePath.rfind (sepW);
- if ((posW != string::npos) && ((posW > pos) || (pos == string::npos))) pos = posW;
- if (pos != string::npos) {
- string dirName = filePath.substr(0, pos);
+PathFilePair IncludesCollection::split_path(const std::string& filePath) {
+ std::string sepU = "/";
+ std::string sepW = "\\";
+ std::string::size_type pos = filePath.rfind (sepU);
+ std::string::size_type posW = filePath.rfind (sepW);
+ if ((posW != std::string::npos) && ((posW > pos) || (pos == std::string::npos))) pos = posW;
+ if (pos != std::string::npos) {
+ std::string dirName = filePath.substr(0, pos);
return PathFilePair(dirName, filePath.substr(pos + 1, filePath.length()));
} else
return PathFilePair(".", filePath);
}
-void IncludesCollection::add_to_collection(const string& dirPath) {
+void IncludesCollection::add_to_collection(const std::string& dirPath) {
DirContent dirContent;
#if defined(_WIN32)
WIN32_FIND_DATA FindFileData;
@@ -29,7 +27,7 @@ void IncludesCollection::add_to_collection(const string& dirPath) {
return;
}
do {
- string winFileName(FindFileData.cFileName);
+ std::string winFileName(FindFileData.cFileName);
transform(
winFileName.begin(), winFileName.end(), winFileName.begin(),
[](char c) {
@@ -54,7 +52,7 @@ void IncludesCollection::add_to_collection(const string& dirPath) {
allIncludes.insert(EntriesPair(dirPath, dirContent));
}
-bool IncludesCollection::exists(string filePath) {
+bool IncludesCollection::exists(std::string filePath) {
#if defined(_WIN32)
transform(
filePath.begin(), filePath.end(), filePath.begin(),
@@ -63,8 +61,8 @@ bool IncludesCollection::exists(string filePath) {
});
#endif // defined( _WIN32 )
PathFilePair dirFile = split_path(filePath);
- string dirPath = dirFile.first;
- string fileName = dirFile.second;
+ std::string dirPath = dirFile.first;
+ std::string fileName = dirFile.second;
DirMap::iterator mapIter = allIncludes.find(dirPath);
if (mapIter == allIncludes.end()) {
add_to_collection(dirPath);