From 270eb96df05b93023cdd3d3a186b44b4ece1d655 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Mon, 10 Feb 2014 00:21:34 -0500 Subject: [PATCH] strings: Remove cmStdString references Casts from std::string -> cmStdString were high on the list of things taking up time. Avoid such implicit casts across function calls by just using std::string everywhere. The comment that the symbol name is too long is no longer relevant since modern debuggers alias the templates anyways and the size is a non-issue since the underlying methods are generated since it's inherited. --- Source/CPack/cmCPackGeneratorFactory.h | 4 +- Source/CPack/cpack.cxx | 2 +- Source/CTest/cmCTestBZR.cxx | 4 +- Source/CTest/cmCTestBuildAndTestHandler.h | 2 +- Source/CTest/cmCTestBuildHandler.cxx | 12 +-- Source/CTest/cmCTestBuildHandler.h | 14 +-- Source/CTest/cmCTestCVS.cxx | 6 +- Source/CTest/cmCTestCVS.h | 4 +- Source/CTest/cmCTestCoverageCommand.h | 2 +- Source/CTest/cmCTestCoverageHandler.cxx | 24 ++--- Source/CTest/cmCTestCoverageHandler.h | 12 +-- Source/CTest/cmCTestGIT.cxx | 4 +- Source/CTest/cmCTestGenericHandler.h | 2 +- Source/CTest/cmCTestGlobalVC.cxx | 2 +- Source/CTest/cmCTestGlobalVC.h | 4 +- Source/CTest/cmCTestHG.cxx | 4 +- Source/CTest/cmCTestLaunch.cxx | 2 +- Source/CTest/cmCTestLaunch.h | 2 +- Source/CTest/cmCTestMemCheckHandler.cxx | 34 +++---- Source/CTest/cmCTestMemCheckHandler.h | 10 +- Source/CTest/cmCTestMultiProcessHandler.cxx | 2 +- Source/CTest/cmCTestMultiProcessHandler.h | 10 +- Source/CTest/cmCTestP4.cxx | 8 +- Source/CTest/cmCTestSVN.cxx | 8 +- Source/CTest/cmCTestScriptHandler.cxx | 4 +- Source/CTest/cmCTestScriptHandler.h | 28 +++--- Source/CTest/cmCTestSubmitCommand.cxx | 6 +- Source/CTest/cmCTestSubmitHandler.cxx | 98 +++++++++---------- Source/CTest/cmCTestSubmitHandler.h | 54 +++++----- Source/CTest/cmCTestTestHandler.cxx | 30 +++--- Source/CTest/cmCTestTestHandler.h | 18 ++-- Source/CTest/cmCTestUploadCommand.cxx | 2 +- Source/CTest/cmCTestVC.cxx | 4 +- Source/CTest/cmParseGTMCoverage.cxx | 2 +- Source/CTest/cmParseMumpsCoverage.cxx | 2 +- Source/CTest/cmParseMumpsCoverage.h | 2 +- Source/CTest/cmParsePHPCoverage.cxx | 4 +- Source/CTest/cmParsePHPCoverage.h | 2 +- Source/CursesDialog/cmCursesPathWidget.cxx | 2 +- Source/cmCTest.cxx | 22 ++--- Source/cmCTest.h | 20 ++-- Source/cmCacheManager.cxx | 10 +- Source/cmCacheManager.h | 8 +- Source/cmCommandArgumentParserHelper.h | 4 +- Source/cmComputeLinkDepends.cxx | 10 +- Source/cmComputeLinkDepends.h | 4 +- Source/cmComputeLinkInformation.cxx | 8 +- Source/cmComputeLinkInformation.h | 10 +- Source/cmComputeTargetDepends.cxx | 16 +-- Source/cmComputeTargetDepends.h | 4 +- Source/cmCoreTryCompile.cxx | 2 +- Source/cmCustomCommand.h | 2 +- Source/cmDefinitions.cxx | 20 ++-- Source/cmDefinitions.h | 23 +++-- Source/cmDependsC.cxx | 16 +-- Source/cmDependsC.h | 16 +-- Source/cmDependsFortran.cxx | 40 ++++---- Source/cmDependsJavaParserHelper.cxx | 24 ++--- Source/cmDependsJavaParserHelper.h | 20 ++-- Source/cmDynamicLoader.cxx | 8 +- Source/cmExportFileGenerator.h | 2 +- Source/cmExportInstallFileGenerator.h | 4 +- Source/cmExportLibraryDependenciesCommand.cxx | 12 +-- Source/cmExprParserHelper.h | 4 +- Source/cmExtraCodeBlocksGenerator.cxx | 4 +- Source/cmExtraCodeLiteGenerator.cxx | 4 +- Source/cmExtraEclipseCDT4Generator.cxx | 2 +- Source/cmExtraSublimeTextGenerator.cxx | 2 +- Source/cmFileTimeComparison.cxx | 4 +- Source/cmFindBase.h | 6 +- Source/cmFindCommon.h | 4 +- Source/cmFindLibraryCommand.cxx | 4 +- Source/cmFindPackageCommand.cxx | 2 +- Source/cmFindPackageCommand.h | 12 +-- Source/cmFindPathCommand.cxx | 10 +- Source/cmGeneratorExpression.cxx | 2 +- Source/cmGeneratorExpression.h | 4 +- Source/cmGeneratorExpressionDAGChecker.cxx | 6 +- Source/cmGeneratorExpressionDAGChecker.h | 2 +- Source/cmGeneratorExpressionEvaluator.h | 2 +- Source/cmGeneratorTarget.cxx | 8 +- Source/cmGetCMakePropertyCommand.cxx | 4 +- Source/cmGlobalGenerator.cxx | 38 +++---- Source/cmGlobalGenerator.h | 46 ++++----- Source/cmGlobalKdevelopGenerator.cxx | 6 +- Source/cmGlobalNinjaGenerator.cxx | 2 +- Source/cmGlobalUnixMakefileGenerator3.cxx | 12 +-- Source/cmGlobalUnixMakefileGenerator3.h | 2 +- Source/cmGlobalVisualStudio6Generator.cxx | 6 +- Source/cmGlobalVisualStudio6Generator.h | 2 +- Source/cmGlobalVisualStudio71Generator.cxx | 4 +- Source/cmGlobalVisualStudio71Generator.h | 2 +- Source/cmGlobalVisualStudio7Generator.cxx | 4 +- Source/cmGlobalVisualStudio7Generator.h | 4 +- Source/cmGlobalVisualStudio8Generator.cxx | 4 +- Source/cmGlobalVisualStudioGenerator.cxx | 8 +- Source/cmGlobalVisualStudioGenerator.h | 4 +- Source/cmGlobalXCodeGenerator.cxx | 82 ++++++++-------- Source/cmGlobalXCodeGenerator.h | 16 +-- Source/cmGraphVizWriter.cxx | 24 ++--- Source/cmGraphVizWriter.h | 12 +-- Source/cmIDEOptions.cxx | 4 +- Source/cmIDEOptions.h | 4 +- Source/cmIncludeDirectoryCommand.cxx | 2 +- Source/cmInstallCommand.cxx | 2 +- Source/cmInstallExportGenerator.cxx | 2 +- Source/cmInstallTargetGenerator.cxx | 4 +- Source/cmLoadCacheCommand.cxx | 4 +- Source/cmLoadCacheCommand.h | 2 +- Source/cmLocalGenerator.cxx | 20 ++-- Source/cmLocalGenerator.h | 6 +- Source/cmLocalUnixMakefileGenerator3.cxx | 16 +-- Source/cmLocalUnixMakefileGenerator3.h | 18 ++-- Source/cmLocalVisualStudio6Generator.cxx | 6 +- Source/cmLocalVisualStudio7Generator.cxx | 6 +- Source/cmMakeDepend.h | 6 +- Source/cmMakefile.cxx | 46 ++++----- Source/cmMakefile.h | 18 ++-- Source/cmMakefileTargetGenerator.cxx | 12 +-- Source/cmMakefileTargetGenerator.h | 12 +-- Source/cmNinjaNormalTargetGenerator.cxx | 4 +- Source/cmNinjaTargetGenerator.h | 2 +- Source/cmOSXBundleGenerator.h | 4 +- Source/cmOrderDirectories.cxx | 20 ++-- Source/cmOrderDirectories.h | 10 +- Source/cmPropertyDefinitionMap.cxx | 6 +- Source/cmPropertyDefinitionMap.h | 8 +- Source/cmPropertyMap.h | 2 +- Source/cmQtAutoGenerators.cxx | 14 +-- Source/cmRST.cxx | 4 +- Source/cmRST.h | 4 +- Source/cmSetPropertyCommand.cxx | 12 +-- Source/cmSetPropertyCommand.h | 2 +- Source/cmSourceGroup.cxx | 2 +- Source/cmSourceGroup.h | 2 +- Source/cmStandardIncludes.h | 4 +- Source/cmSystemTools.cxx | 50 ++-------- Source/cmSystemTools.h | 17 +--- Source/cmTarget.cxx | 80 +++++++-------- Source/cmTarget.h | 24 ++--- Source/cmTest.h | 2 +- Source/cmVariableWatch.h | 2 +- Source/cmVisualStudio10TargetGenerator.h | 4 +- Source/cmVisualStudioGeneratorOptions.cxx | 4 +- Source/cmXCodeObject.cxx | 6 +- Source/cmXCodeObject.h | 20 ++-- Source/cmake.cxx | 2 +- Source/cmake.h | 8 +- Source/cmcldeps.cxx | 2 +- Source/cmcmd.cxx | 18 ++-- Source/cmcmd.h | 4 +- Tests/CMakeLib/run_compile_commands.cxx | 8 +- 152 files changed, 805 insertions(+), 841 deletions(-) diff --git a/Source/CPack/cmCPackGeneratorFactory.h b/Source/CPack/cmCPackGeneratorFactory.h index e6f74f9e8..010777f25 100644 --- a/Source/CPack/cmCPackGeneratorFactory.h +++ b/Source/CPack/cmCPackGeneratorFactory.h @@ -42,7 +42,7 @@ public: void SetLogger(cmCPackLog* logger) { this->Logger = logger; } - typedef std::map DescriptionsMap; + typedef std::map DescriptionsMap; const DescriptionsMap& GetGeneratorsList() const { return this->GeneratorDescriptions; } @@ -50,7 +50,7 @@ private: cmCPackGenerator* NewGeneratorInternal(const std::string& name); std::vector Generators; - typedef std::map t_GeneratorCreatorsMap; + typedef std::map t_GeneratorCreatorsMap; t_GeneratorCreatorsMap GeneratorCreators; DescriptionsMap GeneratorDescriptions; cmCPackLog* Logger; diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx index a19b778ac..d74c38d04 100644 --- a/Source/CPack/cpack.cxx +++ b/Source/CPack/cpack.cxx @@ -68,7 +68,7 @@ int cpackUnknownArgument(const char*, void*) //---------------------------------------------------------------------------- struct cpackDefinitions { - typedef std::map MapType; + typedef std::map MapType; MapType Map; cmCPackLog *Log; }; diff --git a/Source/CTest/cmCTestBZR.cxx b/Source/CTest/cmCTestBZR.cxx index 381c70ce5..840ebc93f 100644 --- a/Source/CTest/cmCTestBZR.cxx +++ b/Source/CTest/cmCTestBZR.cxx @@ -409,7 +409,7 @@ bool cmCTestBZR::UpdateImpl() { opts = this->CTest->GetCTestConfiguration("BZRUpdateOptions"); } - std::vector args = cmSystemTools::ParseArguments(opts.c_str()); + std::vector args = cmSystemTools::ParseArguments(opts.c_str()); // TODO: if(this->CTest->GetTestModel() == cmCTest::NIGHTLY) @@ -418,7 +418,7 @@ bool cmCTestBZR::UpdateImpl() bzr_update.push_back(this->CommandLineTool.c_str()); bzr_update.push_back("pull"); - for(std::vector::const_iterator ai = args.begin(); + for(std::vector::const_iterator ai = args.begin(); ai != args.end(); ++ai) { bzr_update.push_back(ai->c_str()); diff --git a/Source/CTest/cmCTestBuildAndTestHandler.h b/Source/CTest/cmCTestBuildAndTestHandler.h index ca50c6452..d1e9a4d19 100644 --- a/Source/CTest/cmCTestBuildAndTestHandler.h +++ b/Source/CTest/cmCTestBuildAndTestHandler.h @@ -54,7 +54,7 @@ protected: std::string &cmakeOutString, std::string &cwd, cmake *cm); - cmStdString Output; + std::string Output; std::string BuildGenerator; std::string BuildGeneratorToolset; diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx index c5deb964a..291c70a6f 100644 --- a/Source/CTest/cmCTestBuildHandler.cxx +++ b/Source/CTest/cmCTestBuildHandler.cxx @@ -380,7 +380,7 @@ int cmCTestBuildHandler::ProcessHandler() // Create lists of regular expression strings for errors, error exceptions, // warnings and warning exceptions. - std::vector::size_type cc; + std::vector::size_type cc; for ( cc = 0; cmCTestErrorMatches[cc]; cc ++ ) { this->CustomErrorMatches.push_back(cmCTestErrorMatches[cc]); @@ -400,7 +400,7 @@ int cmCTestBuildHandler::ProcessHandler() } // Pre-compile regular expressions objects for all regular expressions - std::vector::iterator it; + std::vector::iterator it; #define cmCTestBuildHandlerPopulateRegexVector(strings, regexes) \ regexes.clear(); \ @@ -602,7 +602,7 @@ void cmCTestBuildHandler::GenerateXMLLaunched(std::ostream& os) // Sort XML fragments in chronological order. cmFileTimeComparison ftc; FragmentCompare fragmentCompare(&ftc); - typedef std::set Fragments; + typedef std::set Fragments; Fragments fragments(fragmentCompare); // Identify fragments on disk. @@ -889,7 +889,7 @@ int cmCTestBuildHandler::RunMakeCommand(const char* command, int* retVal, const char* dir, int timeout, std::ostream& ofs) { // First generate the command and arguments - std::vector args = cmSystemTools::ParseArguments(command); + std::vector args = cmSystemTools::ParseArguments(command); if(args.size() < 1) { @@ -897,7 +897,7 @@ int cmCTestBuildHandler::RunMakeCommand(const char* command, } std::vector argv; - for(std::vector::const_iterator a = args.begin(); + for(std::vector::const_iterator a = args.begin(); a != args.end(); ++a) { argv.push_back(a->c_str()); @@ -1133,7 +1133,7 @@ void cmCTestBuildHandler::ProcessBuffer(const char* data, int length, errorwarning.PostContext = ""; // Copy pre-context to report - std::deque::iterator pcit; + std::deque::iterator pcit; for ( pcit = this->PreContext.begin(); pcit != this->PreContext.end(); ++pcit ) diff --git a/Source/CTest/cmCTestBuildHandler.h b/Source/CTest/cmCTestBuildHandler.h index ff7cfd680..09346f949 100644 --- a/Source/CTest/cmCTestBuildHandler.h +++ b/Source/CTest/cmCTestBuildHandler.h @@ -97,10 +97,10 @@ private: double StartBuildTime; double EndBuildTime; - std::vector CustomErrorMatches; - std::vector CustomErrorExceptions; - std::vector CustomWarningMatches; - std::vector CustomWarningExceptions; + std::vector CustomErrorMatches; + std::vector CustomErrorExceptions; + std::vector CustomWarningMatches; + std::vector CustomWarningExceptions; std::vector ReallyCustomWarningMatches; std::vector ReallyCustomWarningExceptions; std::vector ErrorWarningFileLineRegex; @@ -121,8 +121,8 @@ private: size_t BuildOutputLogSize; std::vector CurrentProcessingLine; - cmStdString SimplifySourceDir; - cmStdString SimplifyBuildDir; + std::string SimplifySourceDir; + std::string SimplifyBuildDir; size_t OutputLineCounter; typedef std::vector t_ErrorsAndWarningsVector; t_ErrorsAndWarningsVector ErrorsAndWarnings; @@ -130,7 +130,7 @@ private: size_t PostContextCount; size_t MaxPreContext; size_t MaxPostContext; - std::deque PreContext; + std::deque PreContext; int TotalErrors; int TotalWarnings; diff --git a/Source/CTest/cmCTestCVS.cxx b/Source/CTest/cmCTestCVS.cxx index 17dbb5556..ab363d016 100644 --- a/Source/CTest/cmCTestCVS.cxx +++ b/Source/CTest/cmCTestCVS.cxx @@ -99,7 +99,7 @@ bool cmCTestCVS::UpdateImpl() opts = "-dP"; } } - std::vector args = cmSystemTools::ParseArguments(opts.c_str()); + std::vector args = cmSystemTools::ParseArguments(opts.c_str()); // Specify the start time for nightly testing. if(this->CTest->GetTestModel() == cmCTest::NIGHTLY) @@ -112,7 +112,7 @@ bool cmCTestCVS::UpdateImpl() cvs_update.push_back(this->CommandLineTool.c_str()); cvs_update.push_back("-z3"); cvs_update.push_back("update"); - for(std::vector::const_iterator ai = args.begin(); + for(std::vector::const_iterator ai = args.begin(); ai != args.end(); ++ai) { cvs_update.push_back(ai->c_str()); @@ -308,7 +308,7 @@ bool cmCTestCVS::WriteXMLUpdates(std::ostream& xml) " Gathering version information (one . per updated file):\n" " " << std::flush); - for(std::map::const_iterator + for(std::map::const_iterator di = this->Dirs.begin(); di != this->Dirs.end(); ++di) { this->WriteXMLDirectory(xml, di->first, di->second); diff --git a/Source/CTest/cmCTestCVS.h b/Source/CTest/cmCTestCVS.h index b7fe567d8..64e1747d1 100644 --- a/Source/CTest/cmCTestCVS.h +++ b/Source/CTest/cmCTestCVS.h @@ -32,8 +32,8 @@ private: virtual bool WriteXMLUpdates(std::ostream& xml); // Update status for files in each directory. - class Directory: public std::map {}; - std::map Dirs; + class Directory: public std::map {}; + std::map Dirs; std::string ComputeBranchFlag(std::string const& dir); void LoadRevisions(std::string const& file, const char* branchFlag, diff --git a/Source/CTest/cmCTestCoverageCommand.h b/Source/CTest/cmCTestCoverageCommand.h index 11bb4112d..37315922c 100644 --- a/Source/CTest/cmCTestCoverageCommand.h +++ b/Source/CTest/cmCTestCoverageCommand.h @@ -56,7 +56,7 @@ protected: }; bool LabelsMentioned; - std::set Labels; + std::set Labels; }; diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx index 0503d941a..2e35b7575 100644 --- a/Source/CTest/cmCTestCoverageHandler.cxx +++ b/Source/CTest/cmCTestCoverageHandler.cxx @@ -363,7 +363,7 @@ int cmCTestCoverageHandler::ProcessHandler() // setup the regex exclude stuff this->CustomCoverageExcludeRegex.clear(); - std::vector::iterator rexIt; + std::vector::iterator rexIt; for ( rexIt = this->CustomCoverageExclude.begin(); rexIt != this->CustomCoverageExclude.end(); ++ rexIt ) @@ -713,7 +713,7 @@ void cmCTestCoverageHandler::PopulateCustomVectors(cmMakefile *mf) this->CustomCoverageExclude); this->CTest->PopulateCustomVector(mf, "CTEST_EXTRA_COVERAGE_GLOB", this->ExtraCoverageGlobs); - std::vector::iterator it; + std::vector::iterator it; for ( it = this->CustomCoverageExclude.begin(); it != this->CustomCoverageExclude.end(); ++ it ) @@ -989,8 +989,8 @@ int cmCTestCoverageHandler::HandleGCovCoverage( << "--------------------------------------------------------------" << std::endl); - std::vector lines; - std::vector::iterator line; + std::vector lines; + std::vector::iterator line; cmSystemTools::Split(output.c_str(), lines); @@ -1504,7 +1504,7 @@ namespace //---------------------------------------------------------------------- int cmCTestCoverageHandler::RunBullseyeCoverageBranch( cmCTestCoverageHandlerContainer* cont, - std::set& coveredFileNames, + std::set& coveredFileNames, std::vector& files, std::vector& filesFullPath) { @@ -1545,7 +1545,7 @@ int cmCTestCoverageHandler::RunBullseyeCoverageBranch( outputFile.c_str() << std::endl); return 0; } - std::map fileMap; + std::map fileMap; std::vector::iterator fp = filesFullPath.begin(); for(std::vector::iterator f = files.begin(); f != files.end(); ++f, ++fp) @@ -1558,7 +1558,7 @@ int cmCTestCoverageHandler::RunBullseyeCoverageBranch( std::string lineIn; bool valid = false; // are we in a valid output file int line = 0; // line of the current file - cmStdString file; + std::string file; while(cmSystemTools::GetLineFromStream(fin, lineIn)) { bool startFile = false; @@ -1593,7 +1593,7 @@ int cmCTestCoverageHandler::RunBullseyeCoverageBranch( } count++; // move on one } - std::map::iterator + std::map::iterator i = fileMap.find(file); // if the file should be covered write out the header for that file if(i != fileMap.end()) @@ -1758,7 +1758,7 @@ int cmCTestCoverageHandler::RunBullseyeSourceSummary( outputFile.c_str() << std::endl); return 0; } - std::set coveredFileNames; + std::set coveredFileNames; while(cmSystemTools::GetLineFromStream(fin, stdline)) { // if we have a line of output from stdout @@ -2105,10 +2105,10 @@ void cmCTestCoverageHandler::WriteXMLLabels(std::ostream& os, //---------------------------------------------------------------------------- void -cmCTestCoverageHandler::SetLabelFilter(std::set const& labels) +cmCTestCoverageHandler::SetLabelFilter(std::set const& labels) { this->LabelFilter.clear(); - for(std::set::const_iterator li = labels.begin(); + for(std::set::const_iterator li = labels.begin(); li != labels.end(); ++li) { this->LabelFilter.insert(this->GetLabelId(*li)); @@ -2158,7 +2158,7 @@ std::set cmCTestCoverageHandler::FindUncoveredFiles( { std::set extraMatches; - for(std::vector::iterator i = this->ExtraCoverageGlobs.begin(); + for(std::vector::iterator i = this->ExtraCoverageGlobs.begin(); i != this->ExtraCoverageGlobs.end(); ++i) { cmsys::Glob gl; diff --git a/Source/CTest/cmCTestCoverageHandler.h b/Source/CTest/cmCTestCoverageHandler.h index 660f501b2..6a8f55def 100644 --- a/Source/CTest/cmCTestCoverageHandler.h +++ b/Source/CTest/cmCTestCoverageHandler.h @@ -55,7 +55,7 @@ public: void PopulateCustomVectors(cmMakefile *mf); /** Report coverage only for sources with these labels. */ - void SetLabelFilter(std::set const& labels); + void SetLabelFilter(std::set const& labels); private: bool ShouldIDoCoverage(const char* file, const char* srcDir, @@ -81,7 +81,7 @@ private: int HandleBullseyeCoverage(cmCTestCoverageHandlerContainer* cont); int RunBullseyeSourceSummary(cmCTestCoverageHandlerContainer* cont); int RunBullseyeCoverageBranch(cmCTestCoverageHandlerContainer* cont, - std::set& coveredFileNames, + std::set& coveredFileNames, std::vector& files, std::vector& filesFullPath); @@ -112,19 +112,19 @@ private: std::set FindUncoveredFiles( cmCTestCoverageHandlerContainer* cont); - std::vector CustomCoverageExclude; + std::vector CustomCoverageExclude; std::vector CustomCoverageExcludeRegex; - std::vector ExtraCoverageGlobs; + std::vector ExtraCoverageGlobs; // Map from source file to label ids. class LabelSet: public std::set {}; - typedef std::map LabelMapType; + typedef std::map LabelMapType; LabelMapType SourceLabels; LabelMapType TargetDirs; // Map from label name to label id. - typedef std::map LabelIdMapType; + typedef std::map LabelIdMapType; LabelIdMapType LabelIdMap; std::vector Labels; int GetLabelId(std::string const& label); diff --git a/Source/CTest/cmCTestGIT.cxx b/Source/CTest/cmCTestGIT.cxx index 0e0e797b5..aaa01b2d0 100644 --- a/Source/CTest/cmCTestGIT.cxx +++ b/Source/CTest/cmCTestGIT.cxx @@ -179,8 +179,8 @@ bool cmCTestGIT::UpdateByFetchAndReset() { opts = this->CTest->GetCTestConfiguration("GITUpdateOptions"); } - std::vector args = cmSystemTools::ParseArguments(opts.c_str()); - for(std::vector::const_iterator ai = args.begin(); + std::vector args = cmSystemTools::ParseArguments(opts.c_str()); + for(std::vector::const_iterator ai = args.begin(); ai != args.end(); ++ai) { git_fetch.push_back(ai->c_str()); diff --git a/Source/CTest/cmCTestGenericHandler.h b/Source/CTest/cmCTestGenericHandler.h index d05e23023..2788cba57 100644 --- a/Source/CTest/cmCTestGenericHandler.h +++ b/Source/CTest/cmCTestGenericHandler.h @@ -71,7 +71,7 @@ public: cmCTestGenericHandler(); virtual ~cmCTestGenericHandler(); - typedef std::map t_StringToString; + typedef std::map t_StringToString; void SetPersistentOption(const std::string& op, const char* value); diff --git a/Source/CTest/cmCTestGlobalVC.cxx b/Source/CTest/cmCTestGlobalVC.cxx index 8c51102e5..5f570b5d3 100644 --- a/Source/CTest/cmCTestGlobalVC.cxx +++ b/Source/CTest/cmCTestGlobalVC.cxx @@ -132,7 +132,7 @@ bool cmCTestGlobalVC::WriteXMLUpdates(std::ostream& xml) this->WriteXMLGlobal(xml); - for(std::map::const_iterator + for(std::map::const_iterator di = this->Dirs.begin(); di != this->Dirs.end(); ++di) { this->WriteXMLDirectory(xml, di->first, di->second); diff --git a/Source/CTest/cmCTestGlobalVC.h b/Source/CTest/cmCTestGlobalVC.h index a648a5982..cb0d16560 100644 --- a/Source/CTest/cmCTestGlobalVC.h +++ b/Source/CTest/cmCTestGlobalVC.h @@ -39,8 +39,8 @@ protected: }; // Update status for files in each directory. - class Directory: public std::map {}; - std::map Dirs; + class Directory: public std::map {}; + std::map Dirs; // Old and new repository revisions. std::string OldRevision; diff --git a/Source/CTest/cmCTestHG.cxx b/Source/CTest/cmCTestHG.cxx index 86a7617f1..5bf994989 100644 --- a/Source/CTest/cmCTestHG.cxx +++ b/Source/CTest/cmCTestHG.cxx @@ -149,8 +149,8 @@ bool cmCTestHG::UpdateImpl() { opts = this->CTest->GetCTestConfiguration("HGUpdateOptions"); } - std::vector args = cmSystemTools::ParseArguments(opts.c_str()); - for(std::vector::const_iterator ai = args.begin(); + std::vector args = cmSystemTools::ParseArguments(opts.c_str()); + for(std::vector::const_iterator ai = args.begin(); ai != args.end(); ++ai) { hg_update.push_back(ai->c_str()); diff --git a/Source/CTest/cmCTestLaunch.cxx b/Source/CTest/cmCTestLaunch.cxx index cd3bd5746..c9f9e9e50 100644 --- a/Source/CTest/cmCTestLaunch.cxx +++ b/Source/CTest/cmCTestLaunch.cxx @@ -567,7 +567,7 @@ void cmCTestLaunch::WriteXMLLabels(std::ostream& fxml) fxml << "\n"; fxml << "\t\t\n"; fxml << "\t\t\n"; - for(std::set::const_iterator li = this->Labels.begin(); + for(std::set::const_iterator li = this->Labels.begin(); li != this->Labels.end(); ++li) { fxml << "\t\t\t\n"; diff --git a/Source/CTest/cmCTestLaunch.h b/Source/CTest/cmCTestLaunch.h index f680d19d9..bc90d28cf 100644 --- a/Source/CTest/cmCTestLaunch.h +++ b/Source/CTest/cmCTestLaunch.h @@ -73,7 +73,7 @@ private: bool HaveErr; // Labels associated with the build rule. - std::set Labels; + std::set Labels; void LoadLabels(); bool SourceMatches(std::string const& lhs, std::string const& rhs); diff --git a/Source/CTest/cmCTestMemCheckHandler.cxx b/Source/CTest/cmCTestMemCheckHandler.cxx index fdce04d39..f2982a4f2 100644 --- a/Source/CTest/cmCTestMemCheckHandler.cxx +++ b/Source/CTest/cmCTestMemCheckHandler.cxx @@ -246,8 +246,8 @@ int cmCTestMemCheckHandler::PostProcessHandler() void cmCTestMemCheckHandler::GenerateTestCommand( std::vector& args, int test) { - std::vector::size_type pp; - cmStdString index; + std::vector::size_type pp; + std::string index; cmOStringStream stream; std::string memcheckcommand = cmSystemTools::ConvertToOutputPath(this->MemoryTester.c_str()); @@ -255,9 +255,9 @@ void cmCTestMemCheckHandler::GenerateTestCommand( index = stream.str(); for ( pp = 0; pp < this->MemoryTesterDynamicOptions.size(); pp ++ ) { - cmStdString arg = this->MemoryTesterDynamicOptions[pp]; - cmStdString::size_type pos = arg.find("??"); - if (pos != cmStdString::npos) + std::string arg = this->MemoryTesterDynamicOptions[pp]; + std::string::size_type pos = arg.find("??"); + if (pos != std::string::npos) { arg.replace(pos, 2, index); } @@ -580,7 +580,7 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking() return false; } - std::vector::size_type cc; + std::vector::size_type cc; for ( cc = 0; cmCTestMemCheckResultStrings[cc]; cc ++ ) { this->MemoryTesterGlobalResults[cc] = 0; @@ -627,7 +627,7 @@ bool cmCTestMemCheckHandler::ProcessMemCheckPurifyOutput( const std::string& str, std::string& log, int* results) { - std::vector lines; + std::vector lines; cmSystemTools::Split(str.c_str(), lines); cmOStringStream ostr; log = ""; @@ -636,7 +636,7 @@ bool cmCTestMemCheckHandler::ProcessMemCheckPurifyOutput( int defects = 0; - for( std::vector::iterator i = lines.begin(); + for( std::vector::iterator i = lines.begin(); i != lines.end(); ++i) { int failure = cmCTestMemCheckHandler::NO_MEMORY_FAULT; @@ -681,7 +681,7 @@ bool cmCTestMemCheckHandler::ProcessMemCheckValgrindOutput( const std::string& str, std::string& log, int* results) { - std::vector lines; + std::vector lines; cmSystemTools::Split(str.c_str(), lines); bool unlimitedOutput = false; if(str.find("CTEST_FULL_OUTPUT") != str.npos || @@ -864,10 +864,10 @@ bool cmCTestMemCheckHandler::ProcessMemCheckBoundsCheckerOutput( { log = ""; double sttime = cmSystemTools::GetTime(); - std::vector lines; + std::vector lines; cmSystemTools::Split(str.c_str(), lines); cmCTestLog(this->CTest, DEBUG, "Start test: " << lines.size() << std::endl); - std::vector::size_type cc; + std::vector::size_type cc; for ( cc = 0; cc < lines.size(); cc ++ ) { if(lines[cc] == BOUNDS_CHECKER_MARKER) @@ -923,7 +923,7 @@ cmCTestMemCheckHandler::PostProcessBoundsCheckerTest(cmCTestTestResult& res, cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "PostProcessBoundsCheckerTest for : " << res.Name.c_str() << std::endl); - cmStdString ofile = testOutputFileName(test); + std::string ofile = testOutputFileName(test); if ( ofile.empty() ) { return; @@ -979,7 +979,7 @@ void cmCTestMemCheckHandler::appendMemTesterOutput(cmCTestTestResult& res, int test) { - cmStdString ofile = testOutputFileName(test); + std::string ofile = testOutputFileName(test); if ( ofile.empty() ) { @@ -1000,15 +1000,15 @@ cmCTestMemCheckHandler::appendMemTesterOutput(cmCTestTestResult& res, } } -cmStdString +std::string cmCTestMemCheckHandler::testOutputFileName(int test) { - cmStdString index; + std::string index; cmOStringStream stream; stream << test; index = stream.str(); - cmStdString ofile = this->MemoryTesterOutputFile; - cmStdString::size_type pos = ofile.find("??"); + std::string ofile = this->MemoryTesterOutputFile; + std::string::size_type pos = ofile.find("??"); ofile.replace(pos, 2, index); if ( !cmSystemTools::FileExists(ofile.c_str()) ) diff --git a/Source/CTest/cmCTestMemCheckHandler.h b/Source/CTest/cmCTestMemCheckHandler.h index 040d2e092..0521a4841 100644 --- a/Source/CTest/cmCTestMemCheckHandler.h +++ b/Source/CTest/cmCTestMemCheckHandler.h @@ -89,8 +89,8 @@ private: std::string BoundsCheckerDPBDFile; std::string BoundsCheckerXMLFile; std::string MemoryTester; - std::vector MemoryTesterDynamicOptions; - std::vector MemoryTesterOptions; + std::vector MemoryTesterDynamicOptions; + std::vector MemoryTesterOptions; int MemoryTesterStyle; std::string MemoryTesterOutputFile; int MemoryTesterGlobalResults[NO_MEMORY_FAULT]; @@ -103,8 +103,8 @@ private: */ void GenerateDartOutput(std::ostream& os); - std::vector CustomPreMemCheck; - std::vector CustomPostMemCheck; + std::vector CustomPreMemCheck; + std::vector CustomPostMemCheck; //! Parse Valgrind/Purify/Bounds Checker result out of the output //string. After running, log holds the output and results hold the @@ -127,7 +127,7 @@ private: int test); ///! generate the output filename for the given test index - cmStdString testOutputFileName(int test); + std::string testOutputFileName(int test); }; #endif diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx index ddd1707bc..c979be3f3 100644 --- a/Source/CTest/cmCTestMultiProcessHandler.cxx +++ b/Source/CTest/cmCTestMultiProcessHandler.cxx @@ -369,7 +369,7 @@ void cmCTestMultiProcessHandler::UpdateCostData() // Write list of failed tests fout << "---\n"; - for(std::vector::iterator i = this->Failed->begin(); + for(std::vector::iterator i = this->Failed->begin(); i != this->Failed->end(); ++i) { fout << i->c_str() << "\n"; diff --git a/Source/CTest/cmCTestMultiProcessHandler.h b/Source/CTest/cmCTestMultiProcessHandler.h index 1b53ec7c2..605de3134 100644 --- a/Source/CTest/cmCTestMultiProcessHandler.h +++ b/Source/CTest/cmCTestMultiProcessHandler.h @@ -41,8 +41,8 @@ public: void PrintTestList(); void PrintLabels(); - void SetPassFailVectors(std::vector* passed, - std::vector* failed) + void SetPassFailVectors(std::vector* passed, + std::vector* failed) { this->Passed = passed; this->Failed = failed; @@ -107,9 +107,9 @@ protected: PropertiesMap Properties; std::map TestRunningMap; std::map TestFinishMap; - std::map TestOutput; - std::vector* Passed; - std::vector* Failed; + std::map TestOutput; + std::vector* Passed; + std::vector* Failed; std::vector LastTestsFailed; std::set LockedResources; std::vector* TestResults; diff --git a/Source/CTest/cmCTestP4.cxx b/Source/CTest/cmCTestP4.cxx index b09d6f5a3..1ad94bc40 100644 --- a/Source/CTest/cmCTestP4.cxx +++ b/Source/CTest/cmCTestP4.cxx @@ -346,10 +346,10 @@ void cmCTestP4::SetP4Options(std::vector &CommandOptions) //The CTEST_P4_OPTIONS variable adds additional Perforce command line //options before the main command std::string opts = this->CTest->GetCTestConfiguration("P4Options"); - std::vector args = + std::vector args = cmSystemTools::ParseArguments(opts.c_str()); - for(std::vector::const_iterator ai = args.begin(); + for(std::vector::const_iterator ai = args.begin(); ai != args.end(); ++ai) { P4Options.push_back(ai->c_str()); @@ -538,8 +538,8 @@ bool cmCTestP4::UpdateImpl() { opts = this->CTest->GetCTestConfiguration("P4UpdateOptions"); } - std::vector args = cmSystemTools::ParseArguments(opts.c_str()); - for(std::vector::const_iterator ai = args.begin(); + std::vector args = cmSystemTools::ParseArguments(opts.c_str()); + for(std::vector::const_iterator ai = args.begin(); ai != args.end(); ++ai) { p4_sync.push_back(ai->c_str()); diff --git a/Source/CTest/cmCTestSVN.cxx b/Source/CTest/cmCTestSVN.cxx index 2668c8eef..89592dd8e 100644 --- a/Source/CTest/cmCTestSVN.cxx +++ b/Source/CTest/cmCTestSVN.cxx @@ -277,7 +277,7 @@ bool cmCTestSVN::UpdateImpl() { opts = this->CTest->GetCTestConfiguration("SVNUpdateOptions"); } - std::vector args = cmSystemTools::ParseArguments(opts.c_str()); + std::vector args = cmSystemTools::ParseArguments(opts.c_str()); // Specify the start time for nightly testing. if(this->CTest->GetTestModel() == cmCTest::NIGHTLY) @@ -287,7 +287,7 @@ bool cmCTestSVN::UpdateImpl() std::vector svn_update; svn_update.push_back("update"); - for(std::vector::const_iterator ai = args.begin(); + for(std::vector::const_iterator ai = args.begin(); ai != args.end(); ++ai) { svn_update.push_back(ai->c_str()); @@ -314,9 +314,9 @@ bool cmCTestSVN::RunSVNCommand(std::vector const& parameters, std::string userOptions = this->CTest->GetCTestConfiguration("SVNOptions"); - std::vector parsedUserOptions = + std::vector parsedUserOptions = cmSystemTools::ParseArguments(userOptions.c_str()); - for(std::vector::iterator i = parsedUserOptions.begin(); + for(std::vector::iterator i = parsedUserOptions.begin(); i != parsedUserOptions.end(); ++i) { args.push_back(i->c_str()); diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx index 00a0a097c..7f13855b7 100644 --- a/Source/CTest/cmCTestScriptHandler.cxx +++ b/Source/CTest/cmCTestScriptHandler.cxx @@ -231,7 +231,7 @@ int cmCTestScriptHandler::ExecuteScript(const std::string& total_script_arg) cmSystemTools::GetCTestCommand() << "\n"); // now pass through all the other arguments - std::vector &initArgs = + std::vector &initArgs = this->CTest->GetInitialCommandLineArguments(); //*** need to make sure this does not have the current script *** for(size_t i=1; i < initArgs.size(); ++i) @@ -766,7 +766,7 @@ int cmCTestScriptHandler::PerformExtraUpdates() // do an initial cvs update as required command = this->UpdateCmd; - std::vector::iterator it; + std::vector::iterator it; for (it = this->ExtraUpdates.begin(); it != this->ExtraUpdates.end(); ++ it ) diff --git a/Source/CTest/cmCTestScriptHandler.h b/Source/CTest/cmCTestScriptHandler.h index 44e9dd0f5..42c2f209b 100644 --- a/Source/CTest/cmCTestScriptHandler.h +++ b/Source/CTest/cmCTestScriptHandler.h @@ -138,26 +138,26 @@ private: // Try to remove the binary directory once static bool TryToRemoveBinaryDirectoryOnce(const std::string& directoryPath); - std::vector ConfigurationScripts; + std::vector ConfigurationScripts; std::vector ScriptProcessScope; bool Backup; bool EmptyBinDir; bool EmptyBinDirOnce; - cmStdString SourceDir; - cmStdString BinaryDir; - cmStdString BackupSourceDir; - cmStdString BackupBinaryDir; - cmStdString CTestRoot; - cmStdString CVSCheckOut; - cmStdString CTestCmd; - cmStdString UpdateCmd; - cmStdString CTestEnv; - cmStdString InitialCache; - cmStdString CMakeCmd; - cmStdString CMOutFile; - std::vector ExtraUpdates; + std::string SourceDir; + std::string BinaryDir; + std::string BackupSourceDir; + std::string BackupBinaryDir; + std::string CTestRoot; + std::string CVSCheckOut; + std::string CTestCmd; + std::string UpdateCmd; + std::string CTestEnv; + std::string InitialCache; + std::string CMakeCmd; + std::string CMOutFile; + std::vector ExtraUpdates; double MinimumInterval; double ContinuousDuration; diff --git a/Source/CTest/cmCTestSubmitCommand.cxx b/Source/CTest/cmCTestSubmitCommand.cxx index 24974e3bc..07a994de6 100644 --- a/Source/CTest/cmCTestSubmitCommand.cxx +++ b/Source/CTest/cmCTestSubmitCommand.cxx @@ -72,7 +72,7 @@ cmCTestGenericHandler* cmCTestSubmitCommand::InitializeHandler() if (notesFilesVariable) { std::vector notesFiles; - std::vector newNotesFiles; + cmCTest::VectorOfStrings newNotesFiles; cmSystemTools::ExpandListArgument(notesFilesVariable,notesFiles); std::vector::iterator it; for ( it = notesFiles.begin(); @@ -89,7 +89,7 @@ cmCTestGenericHandler* cmCTestSubmitCommand::InitializeHandler() if (extraFilesVariable) { std::vector extraFiles; - std::vector newExtraFiles; + cmCTest::VectorOfStrings newExtraFiles; cmSystemTools::ExpandListArgument(extraFilesVariable,extraFiles); std::vector::iterator it; for ( it = extraFiles.begin(); @@ -222,7 +222,7 @@ bool cmCTestSubmitCommand::CheckArgumentValue(std::string const& arg) if(this->ArgumentDoing == ArgumentDoingFiles) { - cmStdString filename(arg); + std::string filename(arg); if(cmSystemTools::FileExists(filename.c_str())) { this->Files.insert(filename); diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx index 139f515af..1cd8fc76f 100644 --- a/Source/CTest/cmCTestSubmitHandler.cxx +++ b/Source/CTest/cmCTestSubmitHandler.cxx @@ -170,10 +170,10 @@ void cmCTestSubmitHandler::Initialize() } //---------------------------------------------------------------------------- -bool cmCTestSubmitHandler::SubmitUsingFTP(const cmStdString& localprefix, - const std::set& files, - const cmStdString& remoteprefix, - const cmStdString& url) +bool cmCTestSubmitHandler::SubmitUsingFTP(const std::string& localprefix, + const std::set& files, + const std::string& remoteprefix, + const std::string& url) { CURL *curl; CURLcode res; @@ -217,12 +217,12 @@ bool cmCTestSubmitHandler::SubmitUsingFTP(const cmStdString& localprefix, ::curl_easy_setopt(curl, CURLOPT_UPLOAD, 1); - cmStdString local_file = *file; + std::string local_file = *file; if ( !cmSystemTools::FileExists(local_file.c_str()) ) { local_file = localprefix + "/" + *file; } - cmStdString upload_as + std::string upload_as = url + "/" + remoteprefix + cmSystemTools::GetFilenameName(*file); struct stat st; @@ -324,10 +324,10 @@ bool cmCTestSubmitHandler::SubmitUsingFTP(const cmStdString& localprefix, //---------------------------------------------------------------------------- // Uploading files is simpler -bool cmCTestSubmitHandler::SubmitUsingHTTP(const cmStdString& localprefix, - const std::set& files, - const cmStdString& remoteprefix, - const cmStdString& url) +bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix, + const std::set& files, + const std::string& remoteprefix, + const std::string& url) { CURL *curl; CURLcode res; @@ -336,8 +336,8 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const cmStdString& localprefix, /* In windows, this will init the winsock stuff */ ::curl_global_init(CURL_GLOBAL_ALL); - cmStdString dropMethod(this->CTest->GetCTestConfiguration("DropMethod")); - cmStdString curlopt(this->CTest->GetCTestConfiguration("CurlOptions")); + std::string dropMethod(this->CTest->GetCTestConfiguration("DropMethod")); + std::string curlopt(this->CTest->GetCTestConfiguration("CurlOptions")); std::vector args; cmSystemTools::ExpandListArgument(curlopt.c_str(), args); bool verifyPeerOff = false; @@ -354,7 +354,7 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const cmStdString& localprefix, verifyHostOff = true; } } - cmStdString::size_type kk; + std::string::size_type kk; cmCTest::SetOfStrings::const_iterator file; for ( file = files.begin(); file != files.end(); ++file ) { @@ -414,18 +414,18 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const cmStdString& localprefix, ::curl_easy_setopt(curl, CURLOPT_PUT, 1); ::curl_easy_setopt(curl, CURLOPT_VERBOSE, 1); - cmStdString local_file = *file; + std::string local_file = *file; if ( !cmSystemTools::FileExists(local_file.c_str()) ) { local_file = localprefix + "/" + *file; } - cmStdString remote_file + std::string remote_file = remoteprefix + cmSystemTools::GetFilenameName(*file); *this->LogFile << "\tUpload file: " << local_file.c_str() << " to " << remote_file.c_str() << std::endl; - cmStdString ofile = ""; + std::string ofile = ""; for ( kk = 0; kk < remote_file.size(); kk ++ ) { char c = remote_file[kk]; @@ -448,8 +448,8 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const cmStdString& localprefix, ofile.append(hexCh); } } - cmStdString upload_as - = url + ((url.find("?",0) == cmStdString::npos) ? "?" : "&") + std::string upload_as + = url + ((url.find("?",0) == std::string::npos) ? "?" : "&") + "FileName=" + ofile; upload_as += "&MD5="; @@ -666,9 +666,9 @@ void cmCTestSubmitHandler //---------------------------------------------------------------------------- bool cmCTestSubmitHandler::TriggerUsingHTTP( - const std::set& files, - const cmStdString& remoteprefix, - const cmStdString& url) + const std::set& files, + const std::string& remoteprefix, + const std::string& url) { CURL *curl; char error_buffer[1024]; @@ -721,10 +721,10 @@ bool cmCTestSubmitHandler::TriggerUsingHTTP( ::curl_easy_setopt(curl, CURLOPT_FILE, (void *)&chunk); ::curl_easy_setopt(curl, CURLOPT_DEBUGDATA, (void *)&chunkDebug); - cmStdString rfile + std::string rfile = remoteprefix + cmSystemTools::GetFilenameName(*file); - cmStdString ofile = ""; - cmStdString::iterator kk; + std::string ofile = ""; + std::string::iterator kk; for ( kk = rfile.begin(); kk < rfile.end(); ++ kk) { char c = *kk; @@ -747,8 +747,8 @@ bool cmCTestSubmitHandler::TriggerUsingHTTP( ofile.append(hexCh); } } - cmStdString turl - = url + ((url.find("?",0) == cmStdString::npos) ? "?" : "&") + std::string turl + = url + ((url.find("?",0) == std::string::npos) ? "?" : "&") + "xmlfile=" + ofile; *this->LogFile << "Trigger url: " << turl.c_str() << std::endl; cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " Trigger url: " @@ -805,11 +805,11 @@ bool cmCTestSubmitHandler::TriggerUsingHTTP( //---------------------------------------------------------------------------- bool cmCTestSubmitHandler::SubmitUsingSCP( - const cmStdString& scp_command, - const cmStdString& localprefix, - const std::set& files, - const cmStdString& remoteprefix, - const cmStdString& url) + const std::string& scp_command, + const std::string& localprefix, + const std::set& files, + const std::string& remoteprefix, + const std::string& url) { if ( !scp_command.size() || !localprefix.size() || !files.size() || !remoteprefix.size() || !url.size() ) @@ -906,10 +906,10 @@ bool cmCTestSubmitHandler::SubmitUsingSCP( //---------------------------------------------------------------------------- bool cmCTestSubmitHandler::SubmitUsingCP( - const cmStdString& localprefix, - const std::set& files, - const cmStdString& remoteprefix, - const cmStdString& destination) + const std::string& localprefix, + const std::set& files, + const std::string& remoteprefix, + const std::string& destination) { if ( !localprefix.size() || !files.size() || !remoteprefix.size() || !destination.size() ) @@ -947,17 +947,17 @@ bool cmCTestSubmitHandler::SubmitUsingCP( //---------------------------------------------------------------------------- #if defined(CTEST_USE_XMLRPC) -bool cmCTestSubmitHandler::SubmitUsingXMLRPC(const cmStdString& localprefix, - const std::set& files, - const cmStdString& remoteprefix, - const cmStdString& url) +bool cmCTestSubmitHandler::SubmitUsingXMLRPC(const std::string& localprefix, + const std::set& files, + const std::string& remoteprefix, + const std::string& url) { xmlrpc_env env; char ctestString[] = "CTest"; std::string ctestVersionString = cmVersion::GetCMakeVersion(); char* ctestVersion = const_cast(ctestVersionString.c_str()); - cmStdString realURL = url + "/" + remoteprefix + "/Command/"; + std::string realURL = url + "/" + remoteprefix + "/Command/"; /* Start up our XML-RPC client library. */ xmlrpc_client_init(XMLRPC_CLIENT_NO_FLAGS, ctestString, ctestVersion); @@ -973,7 +973,7 @@ bool cmCTestSubmitHandler::SubmitUsingXMLRPC(const cmStdString& localprefix, { xmlrpc_value *result; - cmStdString local_file = *file; + std::string local_file = *file; if ( !cmSystemTools::FileExists(local_file.c_str()) ) { local_file = localprefix + "/" + *file; @@ -1045,10 +1045,10 @@ bool cmCTestSubmitHandler::SubmitUsingXMLRPC(const cmStdString& localprefix, return true; } #else -bool cmCTestSubmitHandler::SubmitUsingXMLRPC(cmStdString const&, - std::set const&, - cmStdString const&, - cmStdString const&) +bool cmCTestSubmitHandler::SubmitUsingXMLRPC(std::string const&, + std::set const&, + std::string const&, + std::string const&) { return false; } @@ -1085,7 +1085,7 @@ int cmCTestSubmitHandler::ProcessHandler() } if ( getenv("HTTP_PROXY_TYPE") ) { - cmStdString type = getenv("HTTP_PROXY_TYPE"); + std::string type = getenv("HTTP_PROXY_TYPE"); // HTTP/SOCKS4/SOCKS5 if ( type == "HTTP" ) { @@ -1122,7 +1122,7 @@ int cmCTestSubmitHandler::ProcessHandler() } if ( getenv("FTP_PROXY_TYPE") ) { - cmStdString type = getenv("FTP_PROXY_TYPE"); + std::string type = getenv("FTP_PROXY_TYPE"); // HTTP/SOCKS4/SOCKS5 if ( type == "HTTP" ) { @@ -1178,7 +1178,7 @@ int cmCTestSubmitHandler::ProcessHandler() this->CTest->AddIfExists(cmCTest::PartTest, "Test.xml"); if(this->CTest->AddIfExists(cmCTest::PartCoverage, "Coverage.xml")) { - cmCTest::VectorOfStrings gfiles; + std::vector gfiles; std::string gpath = buildDirectory + "/Testing/" + this->CTest->GetCurrentTag(); std::string::size_type glen = gpath.size() + 1; @@ -1247,7 +1247,7 @@ int cmCTestSubmitHandler::ProcessHandler() } this->SetLogFile(&ofs); - cmStdString dropMethod(this->CTest->GetCTestConfiguration("DropMethod")); + std::string dropMethod(this->CTest->GetCTestConfiguration("DropMethod")); if ( dropMethod == "" || dropMethod == "ftp" ) { diff --git a/Source/CTest/cmCTestSubmitHandler.h b/Source/CTest/cmCTestSubmitHandler.h index 14eac80b5..accabd1c5 100644 --- a/Source/CTest/cmCTestSubmitHandler.h +++ b/Source/CTest/cmCTestSubmitHandler.h @@ -47,33 +47,33 @@ private: /** * Submit file using various ways */ - bool SubmitUsingFTP(const cmStdString& localprefix, - const std::set& files, - const cmStdString& remoteprefix, - const cmStdString& url); - bool SubmitUsingHTTP(const cmStdString& localprefix, - const std::set& files, - const cmStdString& remoteprefix, - const cmStdString& url); - bool SubmitUsingSCP(const cmStdString& scp_command, - const cmStdString& localprefix, - const std::set& files, - const cmStdString& remoteprefix, - const cmStdString& url); + bool SubmitUsingFTP(const std::string& localprefix, + const std::set& files, + const std::string& remoteprefix, + const std::string& url); + bool SubmitUsingHTTP(const std::string& localprefix, + const std::set& files, + const std::string& remoteprefix, + const std::string& url); + bool SubmitUsingSCP(const std::string& scp_command, + const std::string& localprefix, + const std::set& files, + const std::string& remoteprefix, + const std::string& url); - bool SubmitUsingCP( const cmStdString& localprefix, - const std::set& files, - const cmStdString& remoteprefix, - const cmStdString& url); + bool SubmitUsingCP( const std::string& localprefix, + const std::set& files, + const std::string& remoteprefix, + const std::string& url); - bool TriggerUsingHTTP(const std::set& files, - const cmStdString& remoteprefix, - const cmStdString& url); + bool TriggerUsingHTTP(const std::set& files, + const std::string& remoteprefix, + const std::string& url); - bool SubmitUsingXMLRPC(const cmStdString& localprefix, - const std::set& files, - const cmStdString& remoteprefix, - const cmStdString& url); + bool SubmitUsingXMLRPC(const std::string& localprefix, + const std::set& files, + const std::string& remoteprefix, + const std::string& url); typedef std::vector cmCTestSubmitHandlerVectorOfChar; @@ -82,10 +82,10 @@ private: std::string GetSubmitResultsPrefix(); class ResponseParser; - cmStdString HTTPProxy; + std::string HTTPProxy; int HTTPProxyType; - cmStdString HTTPProxyAuth; - cmStdString FTPProxy; + std::string HTTPProxyAuth; + std::string FTPProxy; int FTPProxyType; std::ostream* LogFile; bool SubmitPart[cmCTest::PartCount]; diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index 3a04b332d..b1dddcb03 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -540,8 +540,8 @@ int cmCTestTestHandler::ProcessHandler() this->StartLogFile((this->MemCheck ? "DynamicAnalysis" : "Test"), mLogFile); this->LogFile = &mLogFile; - std::vector passed; - std::vector failed; + std::vector passed; + std::vector failed; int total; //start the real time clock @@ -569,7 +569,7 @@ int cmCTestTestHandler::ProcessHandler() { cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, std::endl << "The following tests passed:" << std::endl); - for(std::vector::iterator j = passed.begin(); + for(std::vector::iterator j = passed.begin(); j != passed.end(); ++j) { cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "\t" << *j @@ -661,8 +661,8 @@ void cmCTestTestHandler::PrintLabelSummary() cmCTestTestHandler::ListOfTests::iterator it = this->TestList.begin(); cmCTestTestHandler::TestResultsVector::iterator ri = this->TestResults.begin(); - std::map labelTimes; - std::set labels; + std::map labelTimes; + std::set labels; // initialize maps std::string::size_type maxlen = 0; for(; it != this->TestList.end(); ++it) @@ -702,7 +702,7 @@ void cmCTestTestHandler::PrintLabelSummary() { cmCTestLog(this->CTest, HANDLER_OUTPUT, "\nLabel Time Summary:"); } - for(std::set::const_iterator i = labels.begin(); + for(std::set::const_iterator i = labels.begin(); i != labels.end(); ++i) { std::string label = *i; @@ -1050,8 +1050,8 @@ bool cmCTestTestHandler::GetValue(const char* tag, } //--------------------------------------------------------------------- -void cmCTestTestHandler::ProcessDirectory(std::vector &passed, - std::vector &failed) +void cmCTestTestHandler::ProcessDirectory(std::vector &passed, + std::vector &failed) { this->ComputeTestList(); this->StartTest = this->CTest->CurrentTime(); @@ -1216,7 +1216,7 @@ void cmCTestTestHandler::GenerateDartOutput(std::ostream& os) << "name=\"Command Line\">" << cmXMLSafe(result->FullCommandLine) << "\n"; - std::map::iterator measureIt; + std::map::iterator measureIt; for ( measureIt = result->Properties->Measurements.begin(); measureIt != result->Properties->Measurements.end(); ++ measureIt ) @@ -1328,9 +1328,9 @@ void cmCTestTestHandler::AttachFiles(std::ostream& os, } //---------------------------------------------------------------------- -int cmCTestTestHandler::ExecuteCommands(std::vector& vec) +int cmCTestTestHandler::ExecuteCommands(std::vector& vec) { - std::vector::iterator it; + std::vector::iterator it; for ( it = vec.begin(); it != vec.end(); ++it ) { int retVal = 0; @@ -2112,7 +2112,7 @@ bool cmCTestTestHandler::SetTestsProperties( const std::vector& args) { std::vector::const_iterator it; - std::vector tests; + std::vector tests; bool found = false; for ( it = args.begin(); it != args.end(); ++ it ) { @@ -2137,7 +2137,7 @@ bool cmCTestTestHandler::SetTestsProperties( break; } std::string val = *it; - std::vector::const_iterator tit; + std::vector::const_iterator tit; for ( tit = tests.begin(); tit != tests.end(); ++ tit ) { cmCTestTestHandler::ListOfTests::iterator rtit; @@ -2319,7 +2319,7 @@ bool cmCTestTestHandler::AddTest(const std::vector& args) } if ( this->MemCheck ) { - std::vector::iterator it; + std::vector::iterator it; bool found = false; for ( it = this->CustomTestsIgnore.begin(); it != this->CustomTestsIgnore.end(); ++ it ) @@ -2339,7 +2339,7 @@ bool cmCTestTestHandler::AddTest(const std::vector& args) } else { - std::vector::iterator it; + std::vector::iterator it; bool found = false; for ( it = this->CustomTestsIgnore.begin(); it != this->CustomTestsIgnore.end(); ++ it ) diff --git a/Source/CTest/cmCTestTestHandler.h b/Source/CTest/cmCTestTestHandler.h index 63f9c9368..fe43bb893 100644 --- a/Source/CTest/cmCTestTestHandler.h +++ b/Source/CTest/cmCTestTestHandler.h @@ -87,8 +87,8 @@ public: // ctest -j N will break for that feature struct cmCTestTestProperties { - cmStdString Name; - cmStdString Directory; + std::string Name; + std::string Directory; std::vector Args; std::vector RequiredFiles; std::vector Depends; @@ -98,7 +98,7 @@ public: std::string> > ErrorRegularExpressions; std::vector > RequiredRegularExpressions; - std::map Measurements; + std::map Measurements; bool IsInBasedOnREOptions; bool WillFail; float Cost; @@ -162,7 +162,7 @@ protected: virtual int PreProcessHandler(); virtual int PostProcessHandler(); virtual void GenerateTestCommand(std::vector& args, int test); - int ExecuteCommands(std::vector& vec); + int ExecuteCommands(std::vector& vec); void WriteTestResultHeader(std::ostream& os, cmCTestTestResult* result); void WriteTestResultFooter(std::ostream& os, cmCTestTestResult* result); @@ -177,7 +177,7 @@ protected: typedef std::vector TestResultsVector; TestResultsVector TestResults; - std::vector CustomTestsIgnore; + std::vector CustomTestsIgnore; std::string StartTest; std::string EndTest; unsigned int StartTestTime; @@ -210,8 +210,8 @@ private: /** * Run the tests for a directory and any subdirectories */ - void ProcessDirectory(std::vector &passed, - std::vector &failed); + void ProcessDirectory(std::vector &passed, + std::vector &failed); /** * Get the list of tests in directory and subdirectories. @@ -251,8 +251,8 @@ private: void ExpandTestsToRunInformation(size_t numPossibleTests); void ExpandTestsToRunInformationForRerunFailed(); - std::vector CustomPreTest; - std::vector CustomPostTest; + std::vector CustomPreTest; + std::vector CustomPostTest; std::vector TestsToRun; diff --git a/Source/CTest/cmCTestUploadCommand.cxx b/Source/CTest/cmCTestUploadCommand.cxx index 731c1c7a3..f7de29471 100644 --- a/Source/CTest/cmCTestUploadCommand.cxx +++ b/Source/CTest/cmCTestUploadCommand.cxx @@ -47,7 +47,7 @@ bool cmCTestUploadCommand::CheckArgumentValue(std::string const& arg) { if(this->ArgumentDoing == ArgumentDoingFiles) { - cmStdString filename(arg); + std::string filename(arg); if(cmSystemTools::FileExists(filename.c_str())) { this->Files.insert(filename); diff --git a/Source/CTest/cmCTestVC.cxx b/Source/CTest/cmCTestVC.cxx index fbee2272e..f89fa2ba5 100644 --- a/Source/CTest/cmCTestVC.cxx +++ b/Source/CTest/cmCTestVC.cxx @@ -63,9 +63,9 @@ bool cmCTestVC::InitialCheckout(const char* command) } // Construct the initial checkout command line. - std::vector args = cmSystemTools::ParseArguments(command); + std::vector args = cmSystemTools::ParseArguments(command); std::vector vc_co; - for(std::vector::const_iterator ai = args.begin(); + for(std::vector::const_iterator ai = args.begin(); ai != args.end(); ++ai) { vc_co.push_back(ai->c_str()); diff --git a/Source/CTest/cmParseGTMCoverage.cxx b/Source/CTest/cmParseGTMCoverage.cxx index 528d0dbaa..5bcfeaca4 100644 --- a/Source/CTest/cmParseGTMCoverage.cxx +++ b/Source/CTest/cmParseGTMCoverage.cxx @@ -182,7 +182,7 @@ bool cmParseGTMCoverage::ParseMCOVLine(std::string const& line, // ( file , entry ) = "number_executed:timing_info" // ^COVERAGE("%RSEL","init",8,"FOR_LOOP",1)=1 // ( file , entry, line, IGNORE ) =number_executed - std::vector args; + std::vector args; std::string::size_type pos = line.find('(', 0); // if no ( is found, then return line has no coverage if(pos == std::string::npos) diff --git a/Source/CTest/cmParseMumpsCoverage.cxx b/Source/CTest/cmParseMumpsCoverage.cxx index 6226febfd..fe98964c5 100644 --- a/Source/CTest/cmParseMumpsCoverage.cxx +++ b/Source/CTest/cmParseMumpsCoverage.cxx @@ -140,7 +140,7 @@ bool cmParseMumpsCoverage::LoadPackages(const char* d) bool cmParseMumpsCoverage::FindMumpsFile(std::string const& routine, std::string& filepath) { - std::map::iterator i = + std::map::iterator i = this->RoutineToDirectory.find(routine); if(i != this->RoutineToDirectory.end()) { diff --git a/Source/CTest/cmParseMumpsCoverage.h b/Source/CTest/cmParseMumpsCoverage.h index c1effa79b..bc7189168 100644 --- a/Source/CTest/cmParseMumpsCoverage.h +++ b/Source/CTest/cmParseMumpsCoverage.h @@ -44,7 +44,7 @@ protected: bool FindMumpsFile(std::string const& routine, std::string& filepath); protected: - std::map RoutineToDirectory; + std::map RoutineToDirectory; cmCTestCoverageHandlerContainer& Coverage; cmCTest* CTest; }; diff --git a/Source/CTest/cmParsePHPCoverage.cxx b/Source/CTest/cmParsePHPCoverage.cxx index 1c26c1c59..3b7f968f6 100644 --- a/Source/CTest/cmParsePHPCoverage.cxx +++ b/Source/CTest/cmParsePHPCoverage.cxx @@ -34,7 +34,7 @@ bool cmParsePHPCoverage::ReadUntil(std::istream& in, char until) return true; } bool cmParsePHPCoverage::ReadCoverageArray(std::istream& in, - cmStdString const& fileName) + std::string const& fileName) { cmCTestCoverageHandlerContainer::SingleFileCoverageVector& coverageVector = this->Coverage.TotalCoverage[fileName]; @@ -166,7 +166,7 @@ bool cmParsePHPCoverage::ReadFileInformation(std::istream& in) // read the string data in.read(s, size-1); s[size-1] = 0; - cmStdString fileName = s; + std::string fileName = s; delete [] s; // read close quote if(in.get(c) && c != '"') diff --git a/Source/CTest/cmParsePHPCoverage.h b/Source/CTest/cmParsePHPCoverage.h index 035a093c9..92a76347f 100644 --- a/Source/CTest/cmParsePHPCoverage.h +++ b/Source/CTest/cmParsePHPCoverage.h @@ -35,7 +35,7 @@ private: bool ReadArraySize(std::istream& in, int& size); bool ReadFileInformation(std::istream& in); bool ReadInt(std::istream& in, int& v); - bool ReadCoverageArray(std::istream& in, cmStdString const&); + bool ReadCoverageArray(std::istream& in, std::string const&); bool ReadUntil(std::istream& in, char until); cmCTestCoverageHandlerContainer& Coverage; cmCTest* CTest; diff --git a/Source/CursesDialog/cmCursesPathWidget.cxx b/Source/CursesDialog/cmCursesPathWidget.cxx index 14c325bcb..893ca9914 100644 --- a/Source/CursesDialog/cmCursesPathWidget.cxx +++ b/Source/CursesDialog/cmCursesPathWidget.cxx @@ -57,7 +57,7 @@ void cmCursesPathWidget::OnTab(cmCursesMainForm* fm, WINDOW* w) { glob = cstr + "*"; } - std::vector dirs; + std::vector dirs; cmSystemTools::SimpleGlob(glob.c_str(), dirs, (this->Type == cmCacheManager::PATH?-1:0)); if ( this->CurrentIndex < dirs.size() ) diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 72bb7fd76..ee9b664d6 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -1153,7 +1153,7 @@ int cmCTest::RunMakeCommand(const char* command, std::string* output, int* retVal, const char* dir, int timeout, std::ostream& ofs) { // First generate the command and arguments - std::vector args = cmSystemTools::ParseArguments(command); + std::vector args = cmSystemTools::ParseArguments(command); if(args.size() < 1) { @@ -1161,7 +1161,7 @@ int cmCTest::RunMakeCommand(const char* command, std::string* output, } std::vector argv; - for(std::vector::const_iterator a = args.begin(); + for(std::vector::const_iterator a = args.begin(); a != args.end(); ++a) { argv.push_back(a->c_str()); @@ -1637,7 +1637,7 @@ int cmCTest::GenerateCTestNotesOutput(std::ostream& os, } //---------------------------------------------------------------------- -int cmCTest::GenerateNotesFile(const std::vector &files) +int cmCTest::GenerateNotesFile(const VectorOfStrings &files) { cmGeneratedFileStream ofs; if ( !this->OpenOutputFile(this->CurrentTag, "Notes.xml", ofs) ) @@ -1658,7 +1658,7 @@ int cmCTest::GenerateNotesFile(const char* cfiles) return 1; } - std::vector files; + VectorOfStrings files; cmCTestLog(this, OUTPUT, "Create notes file" << std::endl); @@ -1675,7 +1675,7 @@ int cmCTest::GenerateNotesFile(const char* cfiles) std::string cmCTest::Base64GzipEncodeFile(std::string file) { std::string tarFile = file + "_temp.tar.gz"; - std::vector files; + std::vector files; files.push_back(file); if(!cmSystemTools::CreateTar(tarFile.c_str(), files, true, false, false)) @@ -1722,9 +1722,9 @@ std::string cmCTest::Base64EncodeFile(std::string file) //---------------------------------------------------------------------- -bool cmCTest::SubmitExtraFiles(const std::vector &files) +bool cmCTest::SubmitExtraFiles(const VectorOfStrings &files) { - std::vector::const_iterator it; + VectorOfStrings::const_iterator it; for ( it = files.begin(); it != files.end(); ++ it ) @@ -1749,7 +1749,7 @@ bool cmCTest::SubmitExtraFiles(const char* cfiles) return 1; } - std::vector files; + VectorOfStrings files; cmCTestLog(this, OUTPUT, "Submit extra files" << std::endl); @@ -2594,7 +2594,7 @@ int cmCTest::ReadCustomConfigurationFileTree(const char* dir, cmMakefile* mf) //---------------------------------------------------------------------- void cmCTest::PopulateCustomVector(cmMakefile* mf, const std::string& def, - VectorOfStrings& vec) + std::vector& vec) { const char* dval = mf->GetDefinition(def); if ( !dval ) @@ -2892,7 +2892,7 @@ bool cmCTest::RunCommand( const char* dir, double timeout) { - std::vector args = cmSystemTools::ParseArguments(command); + std::vector args = cmSystemTools::ParseArguments(command); if(args.size() < 1) { @@ -2900,7 +2900,7 @@ bool cmCTest::RunCommand( } std::vector argv; - for(std::vector::const_iterator a = args.begin(); + for(std::vector::const_iterator a = args.begin(); a != args.end(); ++a) { argv.push_back(a->c_str()); diff --git a/Source/cmCTest.h b/Source/cmCTest.h index 1eb0e01a8..836e41d27 100644 --- a/Source/cmCTest.h +++ b/Source/cmCTest.h @@ -101,8 +101,8 @@ public: if the string does not name a valid part. */ Part GetPartFromName(const char* name); - typedef std::vector VectorOfStrings; - typedef std::set SetOfStrings; + typedef std::vector VectorOfStrings; + typedef std::set SetOfStrings; ///! Process Command line arguments int Run(std::vector &, std::string* output = 0); @@ -186,7 +186,7 @@ public: void SetNotesFiles(const char* notes); void PopulateCustomVector(cmMakefile* mf, const std::string& definition, - VectorOfStrings& vec); + std::vector& vec); void PopulateCustomInteger(cmMakefile* mf, const std::string& def, int& val); @@ -352,11 +352,11 @@ public: void AddCTestConfigurationOverwrite(const std::string& encstr); //! Create XML file that contains all the notes specified - int GenerateNotesFile(const std::vector &files); + int GenerateNotesFile(const VectorOfStrings &files); //! Submit extra files to the server bool SubmitExtraFiles(const char* files); - bool SubmitExtraFiles(const std::vector &files); + bool SubmitExtraFiles(const VectorOfStrings &files); //! Set the output log file name void SetOutputLogFileName(const char* name); @@ -391,7 +391,7 @@ public: //! Read the custom configuration files and apply them to the current ctest int ReadCustomConfigurationFileTree(const char* dir, cmMakefile* mf); - std::vector &GetInitialCommandLineArguments() + std::vector &GetInitialCommandLineArguments() { return this->InitialCommandLineArguments; }; //! Set the track to submit to @@ -447,13 +447,13 @@ private: void DetermineNextDayStop(); // these are helper classes - typedef std::map t_TestingHandlers; + typedef std::map t_TestingHandlers; t_TestingHandlers TestingHandlers; bool ShowOnly; //! Map of configuration properties - typedef std::map CTestConfigurationMap; + typedef std::map CTestConfigurationMap; std::string CTestConfigFile; // TODO: The ctest configuration should be a hierarchy of @@ -463,7 +463,7 @@ private: CTestConfigurationMap CTestConfiguration; CTestConfigurationMap CTestConfigurationOverwrites; PartInfo Parts[PartCount]; - typedef std::map PartMapType; + typedef std::map PartMapType; PartMapType PartMap; std::string CurrentTag; @@ -556,7 +556,7 @@ private: int DartVersion; bool DropSiteCDash; - std::vector InitialCommandLineArguments; + std::vector InitialCommandLineArguments; int SubmitIndex; diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx index 141fde598..39b9ae53c 100644 --- a/Source/cmCacheManager.cxx +++ b/Source/cmCacheManager.cxx @@ -90,7 +90,7 @@ bool cmCacheManager::LoadCache(const std::string& path) bool cmCacheManager::LoadCache(const std::string& path, bool internal) { - std::set emptySet; + std::set emptySet; return this->LoadCache(path, internal, emptySet, emptySet); } @@ -195,8 +195,8 @@ void cmCacheManager::CleanCMakeFiles(const std::string& path) bool cmCacheManager::LoadCache(const std::string& path, bool internal, - std::set& excludes, - std::set& includes) + std::set& excludes, + std::set& includes) { std::string cacheFile = path; cacheFile += "/CMakeCache.txt"; @@ -500,7 +500,7 @@ bool cmCacheManager::SaveCache(const std::string& path) fout << "########################\n"; fout << "\n"; - for( std::map::const_iterator i = + for( std::map::const_iterator i = this->Cache.begin(); i != this->Cache.end(); ++i) { const CacheEntry& ce = (*i).second; @@ -693,7 +693,7 @@ void cmCacheManager::PrintCache(std::ostream& out) const { out << "=================================================" << std::endl; out << "CMakeCache Contents:" << std::endl; - for(std::map::const_iterator i = + for(std::map::const_iterator i = this->Cache.begin(); i != this->Cache.end(); ++i) { if((*i).second.Type != INTERNAL) diff --git a/Source/cmCacheManager.h b/Source/cmCacheManager.h index 14cb1d9eb..573f828f1 100644 --- a/Source/cmCacheManager.h +++ b/Source/cmCacheManager.h @@ -72,7 +72,7 @@ public: void SetType(CacheEntryType ty) { this->GetEntry().Type = ty; } bool Initialized() { return this->GetEntry().Initialized; } cmCacheManager &Container; - std::map::iterator Position; + std::map::iterator Position; CacheIterator(cmCacheManager &cm) : Container(cm) { this->Begin(); } @@ -111,8 +111,8 @@ public: bool LoadCache(const std::string& path); bool LoadCache(const std::string& path, bool internal); bool LoadCache(const std::string& path, bool internal, - std::set& excludes, - std::set& includes); + std::set& excludes, + std::set& includes); ///! Save cache for given makefile. Saves to ouput home CMakeCache.txt. bool SaveCache(cmMakefile*) ; @@ -166,7 +166,7 @@ protected: unsigned int CacheMinorVersion; private: cmake* CMakeInstance; - typedef std::map CacheEntryMap; + typedef std::map CacheEntryMap; static void OutputHelpString(std::ostream& fout, const std::string& helpString); static void OutputKey(std::ostream& fout, std::string const& key); diff --git a/Source/cmCommandArgumentParserHelper.h b/Source/cmCommandArgumentParserHelper.h index da00124ef..d375ae624 100644 --- a/Source/cmCommandArgumentParserHelper.h +++ b/Source/cmCommandArgumentParserHelper.h @@ -77,8 +77,8 @@ public: char BSLASHVariable[3]; private: - cmStdString::size_type InputBufferPos; - cmStdString InputBuffer; + std::string::size_type InputBufferPos; + std::string InputBuffer; std::vector OutputBuffer; int CurrentLine; int Verbose; diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx index d51e6e63f..6c1c1de22 100644 --- a/Source/cmComputeLinkDepends.cxx +++ b/Source/cmComputeLinkDepends.cxx @@ -279,12 +279,12 @@ cmComputeLinkDepends::Compute() } //---------------------------------------------------------------------------- -std::map::iterator +std::map::iterator cmComputeLinkDepends::AllocateLinkEntry(std::string const& item) { - std::map::value_type + std::map::value_type index_entry(item, static_cast(this->EntryList.size())); - std::map::iterator + std::map::iterator lei = this->LinkEntryIndex.insert(index_entry).first; this->EntryList.push_back(LinkEntry()); this->InferredDependSets.push_back(0); @@ -297,7 +297,7 @@ int cmComputeLinkDepends::AddLinkEntry(int depender_index, std::string const& item) { // Check if the item entry has already been added. - std::map::iterator lei = this->LinkEntryIndex.find(item); + std::map::iterator lei = this->LinkEntryIndex.find(item); if(lei != this->LinkEntryIndex.end()) { // Yes. We do not need to follow the item's dependencies again. @@ -423,7 +423,7 @@ cmComputeLinkDepends void cmComputeLinkDepends::HandleSharedDependency(SharedDepEntry const& dep) { // Check if the target already has an entry. - std::map::iterator lei = + std::map::iterator lei = this->LinkEntryIndex.find(dep.Item); if(lei == this->LinkEntryIndex.end()) { diff --git a/Source/cmComputeLinkDepends.h b/Source/cmComputeLinkDepends.h index 26bf6dbf9..ac5e368ae 100644 --- a/Source/cmComputeLinkDepends.h +++ b/Source/cmComputeLinkDepends.h @@ -76,7 +76,7 @@ private: typedef cmTarget::LinkLibraryVectorType LinkLibraryVectorType; - std::map::iterator + std::map::iterator AllocateLinkEntry(std::string const& item); int AddLinkEntry(int depender_index, std::string const& item); void AddVarLinkEntries(int depender_index, const char* value); @@ -88,7 +88,7 @@ private: // One entry for each unique item. std::vector EntryList; - std::map LinkEntryIndex; + std::map LinkEntryIndex; // BFS of initial dependencies. struct BFSEntry diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx index 23a6671c5..32b23b8e4 100644 --- a/Source/cmComputeLinkInformation.cxx +++ b/Source/cmComputeLinkInformation.cxx @@ -902,7 +902,7 @@ void cmComputeLinkInformation::ComputeItemParserInfo() // be the library name. Match index 3 will be the library // extension. reg = "^("; - for(std::set::iterator p = this->LinkPrefixes.begin(); + for(std::set::iterator p = this->LinkPrefixes.begin(); p != this->LinkPrefixes.end(); ++p) { reg += *p; @@ -1640,7 +1640,7 @@ void cmComputeLinkInformation::PrintLinkPolicyDiagnosis(std::ostream& os) // List the paths old behavior is adding. os << "and other libraries with known full path:\n"; - std::set emitted; + std::set emitted; for(std::vector::const_iterator i = this->OldLinkDirItems.begin(); i != this->OldLinkDirItems.end(); ++i) @@ -1856,7 +1856,7 @@ cmComputeLinkInformation::AddLibraryRuntimeInfo(std::string const& fullPath) //---------------------------------------------------------------------------- static void cmCLI_ExpandListUnique(const char* str, std::vector& out, - std::set& emitted) + std::set& emitted) { std::vector tmp; cmSystemTools::ExpandListArgument(str, tmp); @@ -1894,7 +1894,7 @@ void cmComputeLinkInformation::GetRPath(std::vector& runtimeDirs, this->Target->GetPropertyAsBool("INSTALL_RPATH_USE_LINK_PATH"); // Construct the RPATH. - std::set emitted; + std::set emitted; if(use_install_rpath) { const char* install_rpath = this->Target->GetProperty("INSTALL_RPATH"); diff --git a/Source/cmComputeLinkInformation.h b/Source/cmComputeLinkInformation.h index 26ee8f044..b5a8bec6b 100644 --- a/Source/cmComputeLinkInformation.h +++ b/Source/cmComputeLinkInformation.h @@ -126,7 +126,7 @@ private: std::vector StaticLinkExtensions; std::vector SharedLinkExtensions; std::vector LinkExtensions; - std::set LinkPrefixes; + std::set LinkPrefixes; cmsys::RegularExpression ExtractStaticLibraryName; cmsys::RegularExpression ExtractSharedLibraryName; cmsys::RegularExpression ExtractAnyLibraryName; @@ -153,7 +153,7 @@ private: // Framework info. void ComputeFrameworkInfo(); void AddFrameworkPath(std::string const& p); - std::set FrameworkPathsEmmitted; + std::set FrameworkPathsEmmitted; cmsys::RegularExpression SplitFramework; // Linker search path computation. @@ -165,14 +165,14 @@ private: void LoadImplicitLinkInfo(); void AddImplicitLinkInfo(); void AddImplicitLinkInfo(std::string const& lang); - std::set ImplicitLinkDirs; - std::set ImplicitLinkLibs; + std::set ImplicitLinkDirs; + std::set ImplicitLinkLibs; // Additional paths configured by the runtime linker std::vector RuntimeLinkDirs; // Linker search path compatibility mode. - std::set OldLinkDirMask; + std::set OldLinkDirMask; std::vector OldLinkDirItems; std::vector OldUserFlagItems; bool OldLinkDirMode; diff --git a/Source/cmComputeTargetDepends.cxx b/Source/cmComputeTargetDepends.cxx index 83d1e2e3a..405643e1b 100644 --- a/Source/cmComputeTargetDepends.cxx +++ b/Source/cmComputeTargetDepends.cxx @@ -211,7 +211,7 @@ void cmComputeTargetDepends::CollectTargetDepends(int depender_index) // dependencies in all targets, because the generated build-systems can't // deal with config-specific dependencies. { - std::set emitted; + std::set emitted; { std::vector tlibs; depender->GetDirectLinkLibraries(0, tlibs, depender); @@ -255,11 +255,11 @@ void cmComputeTargetDepends::CollectTargetDepends(int depender_index) // Loop over all utility dependencies. { - std::set const& tutils = depender->GetUtilities(); - std::set emitted; + std::set const& tutils = depender->GetUtilities(); + std::set emitted; // A target should not depend on itself. emitted.insert(depender->GetName()); - for(std::set::const_iterator util = tutils.begin(); + for(std::set::const_iterator util = tutils.begin(); util != tutils.end(); ++util) { // Don't emit the same utility twice for this target. @@ -275,7 +275,7 @@ void cmComputeTargetDepends::CollectTargetDepends(int depender_index) void cmComputeTargetDepends::AddInterfaceDepends(int depender_index, cmTarget const* dependee, const char *config, - std::set &emitted) + std::set &emitted) { cmTarget const* depender = this->Targets[depender_index]; if(cmTarget::LinkInterface const* iface = @@ -300,7 +300,7 @@ void cmComputeTargetDepends::AddInterfaceDepends(int depender_index, void cmComputeTargetDepends::AddInterfaceDepends(int depender_index, const std::string& dependee_name, bool linking, - std::set &emitted) + std::set &emitted) { cmTarget const* depender = this->Targets[depender_index]; cmTarget const* dependee = @@ -406,8 +406,8 @@ void cmComputeTargetDepends::AddTargetDepend(int depender_index, if(dependee->IsImported()) { // Skip imported targets but follow their utility dependencies. - std::set const& utils = dependee->GetUtilities(); - for(std::set::const_iterator i = utils.begin(); + std::set const& utils = dependee->GetUtilities(); + for(std::set::const_iterator i = utils.begin(); i != utils.end(); ++i) { if(cmTarget const* transitive_dependee = diff --git a/Source/cmComputeTargetDepends.h b/Source/cmComputeTargetDepends.h index dcb450acc..db76a1803 100644 --- a/Source/cmComputeTargetDepends.h +++ b/Source/cmComputeTargetDepends.h @@ -53,10 +53,10 @@ private: bool ComputeFinalDepends(cmComputeComponentGraph const& ccg); void AddInterfaceDepends(int depender_index, const std::string& dependee_name, - bool linking, std::set &emitted); + bool linking, std::set &emitted); void AddInterfaceDepends(int depender_index, cmTarget const* dependee, const char *config, - std::set &emitted); + std::set &emitted); cmGlobalGenerator* GlobalGenerator; bool DebugMode; bool NoCycles; diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx index b0e2b6f42..ea3e81462 100644 --- a/Source/cmCoreTryCompile.cxx +++ b/Source/cmCoreTryCompile.cxx @@ -566,7 +566,7 @@ void cmCoreTryCompile::CleanupFiles(const char* binDir) cmsys::Directory dir; dir.Load(binDir); size_t fileNum; - std::set deletedFiles; + std::set deletedFiles; for (fileNum = 0; fileNum < dir.GetNumberOfFiles(); ++fileNum) { if (strcmp(dir.GetFile(static_cast(fileNum)),".") && diff --git a/Source/cmCustomCommand.h b/Source/cmCustomCommand.h index 6851105d6..67c305e55 100644 --- a/Source/cmCustomCommand.h +++ b/Source/cmCustomCommand.h @@ -72,7 +72,7 @@ public: /** Backtrace of the command that created this custom command. */ cmListFileBacktrace const& GetBacktrace() const; - typedef std::pair ImplicitDependsPair; + typedef std::pair ImplicitDependsPair; class ImplicitDependsList: public std::vector {}; void SetImplicitDepends(ImplicitDependsList const&); void AppendImplicitDepends(ImplicitDependsList const&); diff --git a/Source/cmDefinitions.cxx b/Source/cmDefinitions.cxx index 5fa387750..babf1c4e8 100644 --- a/Source/cmDefinitions.cxx +++ b/Source/cmDefinitions.cxx @@ -85,9 +85,9 @@ const char* cmDefinitions::Set(const std::string& key, const char* value) } //---------------------------------------------------------------------------- -std::set cmDefinitions::LocalKeys() const +std::set cmDefinitions::LocalKeys() const { - std::set keys; + std::set keys; // Consider local definitions. for(MapType::const_iterator mi = this->Map.begin(); mi != this->Map.end(); ++mi) @@ -110,12 +110,12 @@ cmDefinitions cmDefinitions::Closure() const cmDefinitions::cmDefinitions(ClosureTag const&, cmDefinitions const* root): Up(0) { - std::set undefined; + std::set undefined; this->ClosureImpl(undefined, root); } //---------------------------------------------------------------------------- -void cmDefinitions::ClosureImpl(std::set& undefined, +void cmDefinitions::ClosureImpl(std::set& undefined, cmDefinitions const* defs) { // Consider local definitions. @@ -145,17 +145,17 @@ void cmDefinitions::ClosureImpl(std::set& undefined, } //---------------------------------------------------------------------------- -std::set cmDefinitions::ClosureKeys() const +std::set cmDefinitions::ClosureKeys() const { - std::set defined; - std::set undefined; + std::set defined; + std::set undefined; this->ClosureKeys(defined, undefined); return defined; } //---------------------------------------------------------------------------- -void cmDefinitions::ClosureKeys(std::set& defined, - std::set& undefined) const +void cmDefinitions::ClosureKeys(std::set& defined, + std::set& undefined) const { // Consider local definitions. for(MapType::const_iterator mi = this->Map.begin(); @@ -165,7 +165,7 @@ void cmDefinitions::ClosureKeys(std::set& defined, if(defined.find(mi->first) == defined.end() && undefined.find(mi->first) == undefined.end()) { - std::set& m = mi->second.Exists? defined : undefined; + std::set& m = mi->second.Exists? defined : undefined; m.insert(mi->first); } } diff --git a/Source/cmDefinitions.h b/Source/cmDefinitions.h index 24dad29d5..4c1ad0afe 100644 --- a/Source/cmDefinitions.h +++ b/Source/cmDefinitions.h @@ -41,22 +41,25 @@ public: const char* Set(const std::string& key, const char* value); /** Get the set of all local keys. */ - std::set LocalKeys() const; + std::set LocalKeys() const; /** Compute the closure of all defined keys with values. This flattens the scope. The result has no parent. */ cmDefinitions Closure() const; /** Compute the set of all defined keys. */ - std::set ClosureKeys() const; + std::set ClosureKeys() const; private: // String with existence boolean. - struct Def: public cmStdString + struct Def: public std::string { - Def(): cmStdString(), Exists(false) {} - Def(const char* v): cmStdString(v?v:""), Exists(v?true:false) {} - Def(Def const& d): cmStdString(d), Exists(d.Exists) {} + private: + typedef std::string std_string; + public: + Def(): std_string(), Exists(false) {} + Def(const char* v): std_string(v?v:""), Exists(v?true:false) {} + Def(Def const& d): std_string(d), Exists(d.Exists) {} bool Exists; }; static Def NoDef; @@ -65,7 +68,7 @@ private: cmDefinitions* Up; // Local definitions, set or unset. - typedef std::map MapType; + typedef std::map MapType; MapType Map; // Internal query and update methods. @@ -75,12 +78,12 @@ private: // Implementation of Closure() method. struct ClosureTag {}; cmDefinitions(ClosureTag const&, cmDefinitions const* root); - void ClosureImpl(std::set& undefined, + void ClosureImpl(std::set& undefined, cmDefinitions const* defs); // Implementation of ClosureKeys() method. - void ClosureKeys(std::set& defined, - std::set& undefined) const; + void ClosureKeys(std::set& defined, + std::set& undefined) const; }; #endif diff --git a/Source/cmDependsC.cxx b/Source/cmDependsC.cxx index 585f959da..57a66da31 100644 --- a/Source/cmDependsC.cxx +++ b/Source/cmDependsC.cxx @@ -91,7 +91,7 @@ cmDependsC::~cmDependsC() { this->WriteCacheFile(); - for (std::map::iterator it= + for (std::map::iterator it= this->FileCache.begin(); it!=this->FileCache.end(); ++it) { delete it->second; @@ -116,7 +116,7 @@ bool cmDependsC::WriteDependencies(const std::set& sources, return false; } - std::set dependencies; + std::set dependencies; bool haveDeps = false; if (this->ValidDeps != 0) @@ -149,7 +149,7 @@ bool cmDependsC::WriteDependencies(const std::set& sources, this->Encountered.insert(*srcIt); } - std::set scanned; + std::set scanned; // Use reserve to allocate enough memory for tempPathStr // so that during the loops no memory is allocated or freed @@ -182,7 +182,7 @@ bool cmDependsC::WriteDependencies(const std::set& sources, } else { - std::map::iterator + std::map::iterator headerLocationIt=this->HeaderLocationCache.find(current.FileName); if (headerLocationIt!=this->HeaderLocationCache.end()) { @@ -224,7 +224,7 @@ bool cmDependsC::WriteDependencies(const std::set& sources, scanned.insert(fullName); // Check whether this file is already in the cache - std::map::iterator fileIt= + std::map::iterator fileIt= this->FileCache.find(fullName); if (fileIt!=this->FileCache.end()) { @@ -270,7 +270,7 @@ bool cmDependsC::WriteDependencies(const std::set& sources, // convert the dependencies to paths relative to the home output // directory. We must do the same here. internalDepends << obj << std::endl; - for(std::set::const_iterator i=dependencies.begin(); + for(std::set::const_iterator i=dependencies.begin(); i != dependencies.end(); ++i) { makeDepends << obj << ": " << @@ -392,7 +392,7 @@ void cmDependsC::WriteCacheFile() const cacheOut << this->IncludeRegexComplainString << "\n\n"; cacheOut << this->IncludeRegexTransformString << "\n\n"; - for (std::map::const_iterator fileIt= + for (std::map::const_iterator fileIt= this->FileCache.begin(); fileIt!=this->FileCache.end(); ++fileIt) { @@ -421,7 +421,7 @@ void cmDependsC::WriteCacheFile() const //---------------------------------------------------------------------------- void cmDependsC::Scan(std::istream& is, const char* directory, - const cmStdString& fullName) + const std::string& fullName) { cmIncludeLines* newCacheEntry=new cmIncludeLines; newCacheEntry->Used=true; diff --git a/Source/cmDependsC.h b/Source/cmDependsC.h index cd1e7a4bd..07d3c21f3 100644 --- a/Source/cmDependsC.h +++ b/Source/cmDependsC.h @@ -41,7 +41,7 @@ protected: // Method to scan a single file. void Scan(std::istream& is, const char* directory, - const cmStdString& fullName); + const std::string& fullName); // Regular expression to identify C preprocessor include directives. cmsys::RegularExpression IncludeRegexLine; @@ -57,7 +57,7 @@ protected: // Regex to transform #include lines. std::string IncludeRegexTransformString; cmsys::RegularExpression IncludeRegexTransform; - typedef std::map TransformRulesType; + typedef std::map TransformRulesType; TransformRulesType TransformRules; void SetupTransforms(); void ParseTransform(std::string const& xform); @@ -67,8 +67,8 @@ public: // Data structures for dependency graph walk. struct UnscannedEntry { - cmStdString FileName; - cmStdString QuotedLocation; + std::string FileName; + std::string QuotedLocation; }; struct cmIncludeLines @@ -79,13 +79,13 @@ public: }; protected: const std::map* ValidDeps; - std::set Encountered; + std::set Encountered; std::queue Unscanned; - std::map FileCache; - std::map HeaderLocationCache; + std::map FileCache; + std::map HeaderLocationCache; - cmStdString CacheFileName; + std::string CacheFileName; void WriteCacheFile() const; void ReadCacheFile(); diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx index d5472a19c..b3fbaa230 100644 --- a/Source/cmDependsFortran.cxx +++ b/Source/cmDependsFortran.cxx @@ -34,11 +34,11 @@ public: std::string Source; // Set of provided and required modules. - std::set Provides; - std::set Requires; + std::set Provides; + std::set Requires; // Set of files included in the translation unit. - std::set Includes; + std::set Includes; }; //---------------------------------------------------------------------------- @@ -98,24 +98,24 @@ class cmDependsFortranInternals { public: // The set of modules provided by this target. - std::set TargetProvides; + std::set TargetProvides; // Map modules required by this target to locations. - typedef std::map TargetRequiresMap; + typedef std::map TargetRequiresMap; TargetRequiresMap TargetRequires; // Information about each object file. - typedef std::map ObjectInfoMap; + typedef std::map ObjectInfoMap; ObjectInfoMap ObjectInfo; cmDependsFortranSourceInfo& CreateObjectInfo(const char* obj, const char* src) { - std::map::iterator i = + std::map::iterator i = this->ObjectInfo.find(obj); if(i == this->ObjectInfo.end()) { - std::map::value_type + std::map::value_type entry(obj, cmDependsFortranSourceInfo()); i = this->ObjectInfo.insert(entry).first; i->second.Source = src; @@ -260,8 +260,8 @@ bool cmDependsFortran::Finalize(std::ostream& makeDepends, cmGeneratedFileStream fiStream(fiName.c_str()); fiStream << "# The fortran modules provided by this target.\n"; fiStream << "provides\n"; - std::set const& provides = this->Internal->TargetProvides; - for(std::set::const_iterator i = provides.begin(); + std::set const& provides = this->Internal->TargetProvides; + for(std::set::const_iterator i = provides.begin(); i != provides.end(); ++i) { fiStream << " " << *i << "\n"; @@ -275,7 +275,7 @@ bool cmDependsFortran::Finalize(std::ostream& makeDepends, cmGeneratedFileStream fcStream(fcName.c_str()); fcStream << "# Remove fortran modules provided by this target.\n"; fcStream << "FILE(REMOVE"; - for(std::set::const_iterator i = provides.begin(); + for(std::set::const_iterator i = provides.begin(); i != provides.end(); ++i) { std::string mod_upper = mod_dir; @@ -319,14 +319,14 @@ void cmDependsFortran::LocateModules() infoI != objInfo.end(); ++infoI) { cmDependsFortranSourceInfo const& info = infoI->second; - for(std::set::const_iterator i = info.Provides.begin(); + for(std::set::const_iterator i = info.Provides.begin(); i != info.Provides.end(); ++i) { // Include this module in the set provided by this target. this->Internal->TargetProvides.insert(*i); } - for(std::set::const_iterator i = info.Requires.begin(); + for(std::set::const_iterator i = info.Requires.begin(); i != info.Requires.end(); ++i) { // Include this module in the set required by this target. @@ -368,8 +368,8 @@ void cmDependsFortran::LocateModules() void cmDependsFortran::MatchLocalModules() { const char* stampDir = this->TargetDirectory.c_str(); - std::set const& provides = this->Internal->TargetProvides; - for(std::set::const_iterator i = provides.begin(); + std::set const& provides = this->Internal->TargetProvides; + for(std::set::const_iterator i = provides.begin(); i != provides.end(); ++i) { this->ConsiderModule(i->c_str(), stampDir); @@ -445,7 +445,7 @@ cmDependsFortran // Write the include dependencies to the output stream. internalDepends << obj << std::endl; internalDepends << " " << src << std::endl; - for(std::set::const_iterator i = info.Includes.begin(); + for(std::set::const_iterator i = info.Includes.begin(); i != info.Includes.end(); ++i) { makeDepends << obj << ": " << @@ -458,11 +458,11 @@ cmDependsFortran makeDepends << std::endl; // Write module requirements to the output stream. - for(std::set::const_iterator i = info.Requires.begin(); + for(std::set::const_iterator i = info.Requires.begin(); i != info.Requires.end(); ++i) { // Require only modules not provided in the same source. - if(std::set::const_iterator(info.Provides.find(*i)) != + if(std::set::const_iterator(info.Provides.find(*i)) != info.Provides.end()) { continue; @@ -519,7 +519,7 @@ cmDependsFortran } // Write provided modules to the output stream. - for(std::set::const_iterator i = info.Provides.begin(); + for(std::set::const_iterator i = info.Provides.begin(); i != info.Provides.end(); ++i) { std::string proxy = stamp_dir; @@ -538,7 +538,7 @@ cmDependsFortran // Create a target to copy the module after the object file // changes. makeDepends << obj << ".provides.build:\n"; - for(std::set::const_iterator i = info.Provides.begin(); + for(std::set::const_iterator i = info.Provides.begin(); i != info.Provides.end(); ++i) { // Include this module in the set provided by this target. diff --git a/Source/cmDependsJavaParserHelper.cxx b/Source/cmDependsJavaParserHelper.cxx index c30d4bd05..e23e4b7ff 100644 --- a/Source/cmDependsJavaParserHelper.cxx +++ b/Source/cmDependsJavaParserHelper.cxx @@ -36,10 +36,10 @@ cmDependsJavaParserHelper::~cmDependsJavaParserHelper() } void cmDependsJavaParserHelper::CurrentClass -::AddFileNamesForPrinting(std::vector *files, +::AddFileNamesForPrinting(std::vector *files, const char* prefix, const char* sep) { - cmStdString rname = ""; + std::string rname = ""; if ( prefix ) { rname += prefix; @@ -76,7 +76,7 @@ void cmDependsJavaParserHelper::AddClassFound(const char* sclass) { return; } - std::vector::iterator it; + std::vector::iterator it; for ( it = this->ClassesFound.begin(); it != this->ClassesFound.end(); it ++ ) @@ -91,7 +91,7 @@ void cmDependsJavaParserHelper::AddClassFound(const char* sclass) void cmDependsJavaParserHelper::AddPackagesImport(const char* sclass) { - std::vector::iterator it; + std::vector::iterator it; for ( it = this->PackagesImport.begin(); it != this->PackagesImport.end(); it ++ ) @@ -256,8 +256,8 @@ void cmDependsJavaParserHelper::PrintClasses() std::cerr << "Error when parsing. No classes on class stack" << std::endl; abort(); } - std::vector files = this->GetFilesProduced(); - std::vector::iterator sit; + std::vector files = this->GetFilesProduced(); + std::vector::iterator sit; for ( sit = files.begin(); sit != files.end(); ++ sit ) @@ -266,9 +266,9 @@ void cmDependsJavaParserHelper::PrintClasses() } } -std::vector cmDependsJavaParserHelper::GetFilesProduced() +std::vector cmDependsJavaParserHelper::GetFilesProduced() { - std::vector files; + std::vector files; CurrentClass* toplevel = &(*(this->ClassStack.begin())); std::vector::iterator it; for ( it = toplevel->NestedClasses->begin(); @@ -313,7 +313,7 @@ int cmDependsJavaParserHelper::ParseString(const char* str, int verb) std::cout << "Imports packages:"; if ( this->PackagesImport.size() > 0 ) { - std::vector::iterator it; + std::vector::iterator it; for ( it = this->PackagesImport.begin(); it != this->PackagesImport.end(); ++ it ) @@ -325,7 +325,7 @@ int cmDependsJavaParserHelper::ParseString(const char* str, int verb) std::cout << "Depends on:"; if ( this->ClassesFound.size() > 0 ) { - std::vector::iterator it; + std::vector::iterator it; for ( it = this->ClassesFound.begin(); it != this->ClassesFound.end(); ++ it ) @@ -419,8 +419,8 @@ int cmDependsJavaParserHelper::ParseFile(const char* file) return 0; } - cmStdString fullfile = ""; - cmStdString line; + std::string fullfile = ""; + std::string line; while ( cmSystemTools::GetLineFromStream(ifs, line) ) { fullfile += line + "\n"; diff --git a/Source/cmDependsJavaParserHelper.h b/Source/cmDependsJavaParserHelper.h index 9807a048c..554201894 100644 --- a/Source/cmDependsJavaParserHelper.h +++ b/Source/cmDependsJavaParserHelper.h @@ -59,15 +59,15 @@ public: const char* GetCurrentCombine() { return this->CurrentCombine.c_str(); } void UpdateCombine(const char* str1, const char* str2); - std::vector& GetClassesFound() { return this->ClassesFound; } + std::vector& GetClassesFound() { return this->ClassesFound; } - std::vector GetFilesProduced(); + std::vector GetFilesProduced(); private: class CurrentClass { public: - cmStdString Name; + std::string Name; std::vector* NestedClasses; CurrentClass() { @@ -93,16 +93,16 @@ private: { (*this) = c; } - void AddFileNamesForPrinting(std::vector *files, + void AddFileNamesForPrinting(std::vector *files, const char* prefix, const char* sep); }; - cmStdString CurrentPackage; - cmStdString::size_type InputBufferPos; - cmStdString InputBuffer; + std::string CurrentPackage; + std::string::size_type InputBufferPos; + std::string InputBuffer; std::vector OutputBuffer; - std::vector ClassesFound; - std::vector PackagesImport; - cmStdString CurrentCombine; + std::vector ClassesFound; + std::vector PackagesImport; + std::string CurrentCombine; std::vector ClassStack; diff --git a/Source/cmDynamicLoader.cxx b/Source/cmDynamicLoader.cxx index 6a0ab7b1b..944a00072 100644 --- a/Source/cmDynamicLoader.cxx +++ b/Source/cmDynamicLoader.cxx @@ -23,7 +23,7 @@ public: static cmDynamicLoaderCache* GetInstance(); private: - std::map CacheMap; + std::map CacheMap; static cmDynamicLoaderCache* Instance; }; @@ -47,7 +47,7 @@ void cmDynamicLoaderCache::CacheFile(const char* path, bool cmDynamicLoaderCache::GetCacheFile(const char* path, cmsys::DynamicLoader::LibraryHandle& p) { - std::map::iterator it + std::map::iterator it = this->CacheMap.find(path); if ( it != this->CacheMap.end() ) { @@ -59,7 +59,7 @@ bool cmDynamicLoaderCache::GetCacheFile(const char* path, bool cmDynamicLoaderCache::FlushCache(const char* path) { - std::map::iterator it + std::map::iterator it = this->CacheMap.find(path); bool ret = false; if ( it != this->CacheMap.end() ) @@ -73,7 +73,7 @@ bool cmDynamicLoaderCache::FlushCache(const char* path) void cmDynamicLoaderCache::FlushCache() { - for ( std::map::iterator it = this->CacheMap.begin(); it != this->CacheMap.end(); it++ ) diff --git a/Source/cmExportFileGenerator.h b/Source/cmExportFileGenerator.h index f93e72a2a..9e3ce0b49 100644 --- a/Source/cmExportFileGenerator.h +++ b/Source/cmExportFileGenerator.h @@ -63,7 +63,7 @@ public: bool GenerateImportFile(); protected: - typedef std::map ImportPropertyMap; + typedef std::map ImportPropertyMap; // Generate per-configuration target information to the given output // stream. diff --git a/Source/cmExportInstallFileGenerator.h b/Source/cmExportInstallFileGenerator.h index 7c634a4d8..5ee2a7802 100644 --- a/Source/cmExportInstallFileGenerator.h +++ b/Source/cmExportInstallFileGenerator.h @@ -41,7 +41,7 @@ public: /** Get the per-config file generated for each configuraiton. This maps from the configuration name to the file temporary location for installation. */ - std::map const& GetConfigImportFiles() + std::map const& GetConfigImportFiles() { return this->ConfigImportFiles; } /** Compute the globbing expression used to load per-config import @@ -92,7 +92,7 @@ protected: std::string ImportPrefix; // The import file generated for each configuration. - std::map ConfigImportFiles; + std::map ConfigImportFiles; }; #endif diff --git a/Source/cmExportLibraryDependenciesCommand.cxx b/Source/cmExportLibraryDependenciesCommand.cxx index 469a661eb..b04b93799 100644 --- a/Source/cmExportLibraryDependenciesCommand.cxx +++ b/Source/cmExportLibraryDependenciesCommand.cxx @@ -83,9 +83,9 @@ void cmExportLibraryDependenciesCommand::ConstFinalPass() const cmake* cm = this->Makefile->GetCMakeInstance(); cmGlobalGenerator* global = cm->GetGlobalGenerator(); const std::vector& locals = global->GetLocalGenerators(); - std::map libDepsOld; - std::map libDepsNew; - std::map libTypes; + std::map libDepsOld; + std::map libDepsNew; + std::map libTypes; for(std::vector::const_iterator i = locals.begin(); i != locals.end(); ++i) { @@ -175,7 +175,7 @@ void cmExportLibraryDependenciesCommand::ConstFinalPass() const fout << "# Generated by CMake " << cmVersion::GetCMakeVersion() << "\n\n"; fout << "if(" << vertest << ")\n"; fout << " # Information for CMake 2.6 and above.\n"; - for(std::map::const_iterator + for(std::map::const_iterator i = libDepsNew.begin(); i != libDepsNew.end(); ++i) { @@ -186,7 +186,7 @@ void cmExportLibraryDependenciesCommand::ConstFinalPass() const } fout << "else()\n"; fout << " # Information for CMake 2.4 and lower.\n"; - for(std::map::const_iterator + for(std::map::const_iterator i = libDepsOld.begin(); i != libDepsOld.end(); ++i) { @@ -195,7 +195,7 @@ void cmExportLibraryDependenciesCommand::ConstFinalPass() const fout << " set(\"" << i->first << "\" \"" << i->second << "\")\n"; } } - for(std::map::const_iterator i = libTypes.begin(); + for(std::map::const_iterator i = libTypes.begin(); i != libTypes.end(); ++i) { if(i->second != "general") diff --git a/Source/cmExprParserHelper.h b/Source/cmExprParserHelper.h index 4b76b3322..8d6b2cd47 100644 --- a/Source/cmExprParserHelper.h +++ b/Source/cmExprParserHelper.h @@ -49,8 +49,8 @@ public: const char* GetError() { return this->ErrorString.c_str(); } private: - cmStdString::size_type InputBufferPos; - cmStdString InputBuffer; + std::string::size_type InputBufferPos; + std::string InputBuffer; std::vector OutputBuffer; int CurrentLine; int Verbose; diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx index 133996992..01d115505 100644 --- a/Source/cmExtraCodeBlocksGenerator.cxx +++ b/Source/cmExtraCodeBlocksGenerator.cxx @@ -61,7 +61,7 @@ cmExtraCodeBlocksGenerator::cmExtraCodeBlocksGenerator() void cmExtraCodeBlocksGenerator::Generate() { // for each sub project in the project create a codeblocks project - for (std::map >::const_iterator + for (std::map >::const_iterator it = this->GlobalGenerator->GetProjectMap().begin(); it!= this->GlobalGenerator->GetProjectMap().end(); ++it) @@ -243,7 +243,7 @@ void cmExtraCodeBlocksGenerator Tree tree; // build tree of virtual folders - for (std::map >::const_iterator + for (std::map >::const_iterator it = this->GlobalGenerator->GetProjectMap().begin(); it != this->GlobalGenerator->GetProjectMap().end(); ++it) diff --git a/Source/cmExtraCodeLiteGenerator.cxx b/Source/cmExtraCodeLiteGenerator.cxx index 028d3d5b5..1e34fe043 100644 --- a/Source/cmExtraCodeLiteGenerator.cxx +++ b/Source/cmExtraCodeLiteGenerator.cxx @@ -60,7 +60,7 @@ void cmExtraCodeLiteGenerator::Generate() // loop projects and locate the root project. // and extract the information for creating the worspace - for (std::map >::const_iterator + for (std::map >::const_iterator it = this->GlobalGenerator->GetProjectMap().begin(); it!= this->GlobalGenerator->GetProjectMap().end(); ++it) @@ -85,7 +85,7 @@ void cmExtraCodeLiteGenerator::Generate() } // for each sub project in the workspace create a codelite project - for (std::map >::const_iterator + for (std::map >::const_iterator it = this->GlobalGenerator->GetProjectMap().begin(); it!= this->GlobalGenerator->GetProjectMap().end(); ++it) diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx index 74ba9a6b8..38a247034 100644 --- a/Source/cmExtraEclipseCDT4Generator.cxx +++ b/Source/cmExtraEclipseCDT4Generator.cxx @@ -624,7 +624,7 @@ void cmExtraEclipseCDT4Generator::CreateLinksToSubprojects( this->AppendLinkedResource(fout, "[Subprojects]", "virtual:/virtual", VirtualFolder); - for (std::map >::const_iterator + for (std::map >::const_iterator it = this->GlobalGenerator->GetProjectMap().begin(); it != this->GlobalGenerator->GetProjectMap().end(); ++it) diff --git a/Source/cmExtraSublimeTextGenerator.cxx b/Source/cmExtraSublimeTextGenerator.cxx index 3cfafa782..9c2849c01 100644 --- a/Source/cmExtraSublimeTextGenerator.cxx +++ b/Source/cmExtraSublimeTextGenerator.cxx @@ -64,7 +64,7 @@ cmExtraSublimeTextGenerator::cmExtraSublimeTextGenerator() void cmExtraSublimeTextGenerator::Generate() { // for each sub project in the project create a sublime text 2 project - for (std::map >::const_iterator + for (std::map >::const_iterator it = this->GlobalGenerator->GetProjectMap().begin(); it!= this->GlobalGenerator->GetProjectMap().end(); ++it) diff --git a/Source/cmFileTimeComparison.cxx b/Source/cmFileTimeComparison.cxx index 02f10c005..57274708b 100644 --- a/Source/cmFileTimeComparison.cxx +++ b/Source/cmFileTimeComparison.cxx @@ -43,13 +43,13 @@ private: class HashString { public: - size_t operator()(const cmStdString& s) const + size_t operator()(const std::string& s) const { return h(s.c_str()); } cmsys::hash h; }; - typedef cmsys::hash_map FileStatsMap; FileStatsMap Files; #endif diff --git a/Source/cmFindBase.h b/Source/cmFindBase.h index e590d6e69..42d9bc1c0 100644 --- a/Source/cmFindBase.h +++ b/Source/cmFindBase.h @@ -42,14 +42,14 @@ protected: bool CheckForVariableInCache(); // use by command during find - cmStdString VariableDocumentation; - cmStdString VariableName; + std::string VariableDocumentation; + std::string VariableName; std::vector Names; bool NamesPerDir; bool NamesPerDirAllowed; // CMAKE_*_PATH CMAKE_SYSTEM_*_PATH FRAMEWORK|LIBRARY|INCLUDE|PROGRAM - cmStdString EnvironmentPath; // LIB,INCLUDE + std::string EnvironmentPath; // LIB,INCLUDE bool AlreadyInCache; bool AlreadyInCacheWithoutMetaInfo; diff --git a/Source/cmFindCommon.h b/Source/cmFindCommon.h index ba90a8498..5a905cd20 100644 --- a/Source/cmFindCommon.h +++ b/Source/cmFindCommon.h @@ -56,7 +56,7 @@ protected: /** Compute the current default bundle/framework search policy. */ void SelectDefaultMacMode(); - cmStdString CMakePathName; + std::string CMakePathName; RootPathMode FindRootPathMode; bool CheckCommonArgument(std::string const& arg); @@ -81,7 +81,7 @@ protected: std::vector UserPaths; std::vector UserHints; std::vector SearchPaths; - std::set SearchPathsEmitted; + std::set SearchPathsEmitted; bool SearchFrameworkFirst; bool SearchFrameworkOnly; diff --git a/Source/cmFindLibraryCommand.cxx b/Source/cmFindLibraryCommand.cxx index de52df7a0..9345d157e 100644 --- a/Source/cmFindLibraryCommand.cxx +++ b/Source/cmFindLibraryCommand.cxx @@ -368,8 +368,8 @@ bool cmFindLibraryHelper::CheckDirectoryForName(std::string const& path, // Search for a file matching the library name regex. std::string dir = path; cmSystemTools::ConvertToUnixSlashes(dir); - std::set const& files = this->GG->GetDirectoryContent(dir); - for(std::set::const_iterator fi = files.begin(); + std::set const& files = this->GG->GetDirectoryContent(dir); + for(std::set::const_iterator fi = files.begin(); fi != files.end(); ++fi) { std::string const& origName = *fi; diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index d557fba4a..7a4e7f453 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -553,7 +553,7 @@ void cmFindPackageCommand::AddFindDefinition(const std::string& var, //---------------------------------------------------------------------------- void cmFindPackageCommand::RestoreFindDefinitions() { - for(std::map::iterator + for(std::map::iterator i = this->OriginalDefs.begin(); i != this->OriginalDefs.end(); ++i) { OriginalDef const& od = i->second; diff --git a/Source/cmFindPackageCommand.h b/Source/cmFindPackageCommand.h index 9819d4f54..72c1e3c9e 100644 --- a/Source/cmFindPackageCommand.h +++ b/Source/cmFindPackageCommand.h @@ -96,19 +96,19 @@ private: friend class cmFindPackageFileList; struct OriginalDef { bool exists; std::string value; }; - std::map OriginalDefs; + std::map OriginalDefs; - cmStdString Name; - cmStdString Variable; - cmStdString Version; + std::string Name; + std::string Variable; + std::string Version; unsigned int VersionMajor; unsigned int VersionMinor; unsigned int VersionPatch; unsigned int VersionTweak; unsigned int VersionCount; bool VersionExact; - cmStdString FileFound; - cmStdString VersionFound; + std::string FileFound; + std::string VersionFound; unsigned int VersionFoundMajor; unsigned int VersionFoundMinor; unsigned int VersionFoundPatch; diff --git a/Source/cmFindPathCommand.cxx b/Source/cmFindPathCommand.cxx index 845999575..caaf1d3b2 100644 --- a/Source/cmFindPathCommand.cxx +++ b/Source/cmFindPathCommand.cxx @@ -89,9 +89,9 @@ std::string cmFindPathCommand::FindHeaderInFramework(std::string const& file, std::string const& dir) { - cmStdString fileName = file; - cmStdString frameWorkName; - cmStdString::size_type pos = fileName.find("/"); + std::string fileName = file; + std::string frameWorkName; + std::string::size_type pos = fileName.find("/"); // if there is a / in the name try to find the header as a framework // For example bar/foo.h would look for: // bar.framework/Headers/foo.h @@ -128,7 +128,7 @@ cmFindPathCommand::FindHeaderInFramework(std::string const& file, } // if it is not found yet or not a framework header, then do a glob search // for all frameworks in the directory: dir/*.framework/Headers/ - cmStdString glob = dir; + std::string glob = dir; glob += "*.framework/Headers/"; glob += file; cmsys::Glob globIt; @@ -136,7 +136,7 @@ cmFindPathCommand::FindHeaderInFramework(std::string const& file, std::vector files = globIt.GetFiles(); if(files.size()) { - cmStdString fheader = cmSystemTools::CollapseFullPath(files[0].c_str()); + std::string fheader = cmSystemTools::CollapseFullPath(files[0].c_str()); if(this->IncludeFileInPath) { return fheader; diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx index cd3054614..3ebb1b600 100644 --- a/Source/cmGeneratorExpression.cxx +++ b/Source/cmGeneratorExpression.cxx @@ -97,7 +97,7 @@ const char *cmCompiledGeneratorExpression::Evaluate( { this->Output += (*it)->Evaluate(&context, dagChecker); - for(std::set::const_iterator + for(std::set::const_iterator p = context.SeenTargetProperties.begin(); p != context.SeenTargetProperties.end(); ++p) { diff --git a/Source/cmGeneratorExpression.h b/Source/cmGeneratorExpression.h index 4992e9379..58abf1407 100644 --- a/Source/cmGeneratorExpression.h +++ b/Source/cmGeneratorExpression.h @@ -92,7 +92,7 @@ public: std::set const& GetTargets() const { return this->DependTargets; } - std::set const& GetSeenTargetProperties() const + std::set const& GetSeenTargetProperties() const { return this->SeenTargetProperties; } std::set const& GetAllTargetsSeen() const @@ -130,7 +130,7 @@ private: mutable std::set DependTargets; mutable std::set AllTargetsSeen; - mutable std::set SeenTargetProperties; + mutable std::set SeenTargetProperties; mutable std::string Output; mutable bool HadContextSensitiveCondition; }; diff --git a/Source/cmGeneratorExpressionDAGChecker.cxx b/Source/cmGeneratorExpressionDAGChecker.cxx index e7e1d34c8..04f36b473 100644 --- a/Source/cmGeneratorExpressionDAGChecker.cxx +++ b/Source/cmGeneratorExpressionDAGChecker.cxx @@ -42,12 +42,12 @@ cmGeneratorExpressionDAGChecker::cmGeneratorExpressionDAGChecker( ) #undef TEST_TRANSITIVE_PROPERTY_METHOD { - std::map >::const_iterator it + std::map >::const_iterator it = top->Seen.find(target); if (it != top->Seen.end()) { - const std::set &propSet = it->second; - const std::set::const_iterator i = propSet.find(property); + const std::set &propSet = it->second; + const std::set::const_iterator i = propSet.find(property); if (i != propSet.end()) { this->CheckResult = ALREADY_SEEN; diff --git a/Source/cmGeneratorExpressionDAGChecker.h b/Source/cmGeneratorExpressionDAGChecker.h index b6effa185..6cbbd2a07 100644 --- a/Source/cmGeneratorExpressionDAGChecker.h +++ b/Source/cmGeneratorExpressionDAGChecker.h @@ -77,7 +77,7 @@ private: const cmGeneratorExpressionDAGChecker * const Parent; const std::string Target; const std::string Property; - std::map > Seen; + std::map > Seen; const GeneratorExpressionContent * const Content; const cmListFileBacktrace Backtrace; Result CheckResult; diff --git a/Source/cmGeneratorExpressionEvaluator.h b/Source/cmGeneratorExpressionEvaluator.h index 49e52df77..0c8a9cf59 100644 --- a/Source/cmGeneratorExpressionEvaluator.h +++ b/Source/cmGeneratorExpressionEvaluator.h @@ -25,7 +25,7 @@ struct cmGeneratorExpressionContext cmListFileBacktrace Backtrace; std::set DependTargets; std::set AllTargets; - std::set SeenTargetProperties; + std::set SeenTargetProperties; cmMakefile *Makefile; const char *Config; cmTarget const* HeadTarget; // The target whose property is being evaluated. diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 7f22e0053..a7b2efa0a 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -422,7 +422,7 @@ bool cmGeneratorTarget::IsSystemIncludeDirectory(const char *dir, = this->Target->GetPropertyAsBool("NO_SYSTEM_FROM_IMPORTED"); std::vector result; - for (std::set::const_iterator + for (std::set::const_iterator it = this->Target->GetSystemIncludeDirectories().begin(); it != this->Target->GetSystemIncludeDirectories().end(); ++it) { @@ -462,7 +462,7 @@ bool cmGeneratorTarget::IsSystemIncludeDirectory(const char *dir, } } } - std::set unique; + std::set unique; for(std::vector::iterator li = result.begin(); li != result.end(); ++li) { @@ -470,7 +470,7 @@ bool cmGeneratorTarget::IsSystemIncludeDirectory(const char *dir, unique.insert(*li); } result.clear(); - for(std::set::iterator li = unique.begin(); + for(std::set::iterator li = unique.begin(); li != unique.end(); ++li) { result.push_back(*li); @@ -594,7 +594,7 @@ private: SourceEntry* CurrentEntry; std::queue SourceQueue; std::set SourcesQueued; - typedef std::map NameMapType; + typedef std::map NameMapType; NameMapType NameMap; void QueueSource(cmSourceFile* sf); diff --git a/Source/cmGetCMakePropertyCommand.cxx b/Source/cmGetCMakePropertyCommand.cxx index e7ad91a36..5aaf1c63c 100644 --- a/Source/cmGetCMakePropertyCommand.cxx +++ b/Source/cmGetCMakePropertyCommand.cxx @@ -49,10 +49,10 @@ bool cmGetCMakePropertyCommand } else if ( args[1] == "COMPONENTS" ) { - const std::set* components + const std::set* components = this->Makefile->GetLocalGenerator()->GetGlobalGenerator() ->GetInstallComponents(); - std::set::const_iterator compIt; + std::set::const_iterator compIt; output = ""; for (compIt = components->begin(); compIt != components->end(); ++compIt) { diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index ba4cce8eb..9748c6147 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -432,8 +432,8 @@ cmGlobalGenerator::EnableLanguage(std::vectorconst& languages, fpath += "/CMakeSystem.cmake"; mf->ReadListFile(0,fpath.c_str()); } - std::map needTestLanguage; - std::map needSetLanguageEnabledMaps; + std::map needTestLanguage; + std::map needSetLanguageEnabledMaps; // foreach language // load the CMakeDetermine(LANG)Compiler.cmake file to find // the compiler @@ -823,7 +823,7 @@ cmGlobalGenerator::GetLanguageOutputExtension(cmSourceFile const& source) const const std::string& lang = source.GetLanguage(); if(!lang.empty()) { - std::map::const_iterator it = + std::map::const_iterator it = this->LanguageToOutputExtension.find(lang); if(it != this->LanguageToOutputExtension.end()) @@ -857,7 +857,7 @@ std::string cmGlobalGenerator::GetLanguageFromExtension(const char* ext) const { ++ext; } - std::map::const_iterator it + std::map::const_iterator it = this->ExtensionToLanguage.find(ext); if(it != this->ExtensionToLanguage.end()) { @@ -1011,7 +1011,7 @@ bool cmGlobalGenerator::IsDependedOn(const std::string& project, cmTarget const* targetIn) { // Get all local gens for this project - std::map >::const_iterator it = + std::map >::const_iterator it = this->ProjectMap.find(project); if (it == this->ProjectMap.end()) { @@ -1516,8 +1516,8 @@ void cmGlobalGenerator::ComputeTargetObjects(cmGeneratorTarget*) const void cmGlobalGenerator::CheckLocalGenerators() { - std::map notFoundMap; -// std::set notFoundMap; + std::map notFoundMap; +// std::set notFoundMap; // after it is all done do a ConfigureFinalPass cmCacheManager* manager = 0; for (unsigned int i = 0; i < this->LocalGenerators.size(); ++i) @@ -1597,7 +1597,7 @@ void cmGlobalGenerator::CheckLocalGenerators() if(notFoundMap.size()) { std::string notFoundVars; - for(std::map::const_iterator + for(std::map::const_iterator ii = notFoundMap.begin(); ii != notFoundMap.end(); ++ii) @@ -1956,7 +1956,7 @@ bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root, void cmGlobalGenerator::GetEnabledLanguages(std::vector& lang) const { - for(std::map::const_iterator i = + for(std::map::const_iterator i = this->LanguageEnabled.begin(); i != this->LanguageEnabled.end(); ++i) { lang.push_back(i->first); @@ -1965,7 +1965,7 @@ cmGlobalGenerator::GetEnabledLanguages(std::vector& lang) const int cmGlobalGenerator::GetLinkerPreference(const std::string& lang) const { - std::map::const_iterator it = + std::map::const_iterator it = this->LanguageToLinkerPreference.find(lang); if (it != this->LanguageToLinkerPreference.end()) { @@ -2075,14 +2075,14 @@ cmGlobalGenerator::FindTarget(const std::string& name, { if (!excludeAliases) { - std::map::const_iterator ai + std::map::const_iterator ai = this->AliasTargets.find(name); if (ai != this->AliasTargets.end()) { return ai->second; } } - std::map::const_iterator i = + std::map::const_iterator i = this->TotalTargets.find ( name ); if ( i != this->TotalTargets.end() ) { @@ -2294,7 +2294,7 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets) { if(!cmakeCfgIntDir || !*cmakeCfgIntDir || cmakeCfgIntDir[0] == '.') { - std::set* componentsSet = &this->InstallComponents; + std::set* componentsSet = &this->InstallComponents; cpackCommandLines.erase(cpackCommandLines.begin(), cpackCommandLines.end()); depends.erase(depends.begin(), depends.end()); @@ -2302,7 +2302,7 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets) if ( componentsSet->size() > 0 ) { ostr << "Available install components are:"; - std::set::iterator it; + std::set::iterator it; for ( it = componentsSet->begin(); it != componentsSet->end(); @@ -2516,7 +2516,7 @@ cmGlobalGenerator::GenerateRuleFile(std::string const& output) const std::string cmGlobalGenerator::GetSharedLibFlagsForLanguage( std::string const& l) const { - std::map::const_iterator it = + std::map::const_iterator it = this->LanguageToOriginalSharedLibFlags.find(l); if(it != this->LanguageToOriginalSharedLibFlags.end()) { @@ -2690,7 +2690,7 @@ void cmGlobalGenerator::AddToManifest(const char* config, } //---------------------------------------------------------------------------- -std::set const& +std::set const& cmGlobalGenerator::GetDirectoryContent(std::string const& dir, bool needDisk) { DirectoryContent& dc = this->DirectoryContentMap[dir]; @@ -2796,7 +2796,7 @@ void cmGlobalGenerator::CheckRuleHashes(std::string const& pfile, fname = line.substr(33, line.npos); // Look for a hash for this file's rule. - std::map::const_iterator rhi = + std::map::const_iterator rhi = this->RuleHashes.find(fname); if(rhi != this->RuleHashes.end()) { @@ -2841,7 +2841,7 @@ void cmGlobalGenerator::WriteRuleHashes(std::string const& pfile) { cmGeneratedFileStream fout(pfile.c_str()); fout << "# Hashes of file build rules.\n"; - for(std::map::const_iterator + for(std::map::const_iterator rhi = this->RuleHashes.begin(); rhi != this->RuleHashes.end(); ++rhi) { fout.write(rhi->second.Data, 32); @@ -2862,7 +2862,7 @@ void cmGlobalGenerator::WriteSummary() cmGeneratedFileStream fout(fname.c_str()); // Generate summary information files for each target. - for(std::map::const_iterator ti = + for(std::map::const_iterator ti = this->TotalTargets.begin(); ti != this->TotalTargets.end(); ++ti) { if ((ti->second)->GetType() == cmTarget::INTERFACE_LIBRARY) diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 746f715de..f06162c84 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -167,7 +167,7 @@ public: void AddInstallComponent(const char* component); - const std::set* GetInstallComponents() const + const std::set* GetInstallComponents() const { return &this->InstallComponents; } cmExportSetMap& GetExportSets() {return this->ExportSets;} @@ -244,7 +244,7 @@ public: from disk at most once and cached. During the generation step the content will include the target files to be built even if they do not yet exist. */ - std::set const& GetDirectoryContent(std::string const& dir, + std::set const& GetDirectoryContent(std::string const& dir, bool needDisk = true); void AddTarget(cmTarget* t); @@ -276,7 +276,7 @@ public: /** Get per-target generator information. */ cmGeneratorTarget* GetGeneratorTarget(cmTarget const*) const; - const std::map >& GetProjectMap() + const std::map >& GetProjectMap() const {return this->ProjectMap;} // track files replaced during a Generate @@ -364,18 +364,18 @@ protected: bool UseLinkScript; bool ForceUnixPaths; bool ToolSupportsColor; - cmStdString FindMakeProgramFile; - cmStdString ConfiguredFilesPath; + std::string FindMakeProgramFile; + std::string ConfiguredFilesPath; cmake *CMakeInstance; std::vector LocalGenerators; cmLocalGenerator* CurrentLocalGenerator; // map from project name to vector of local generators in that project - std::map > ProjectMap; + std::map > ProjectMap; std::map > LocalGeneratorToTargetMap; // Set of named installation components requested by the project. - std::set InstallComponents; + std::set InstallComponents; bool InstallTargetEnabled; // Sets of named target exports cmExportSetMap ExportSets; @@ -387,9 +387,9 @@ protected: cmTargetManifest TargetManifest; // All targets in the entire project. - std::map TotalTargets; - std::map AliasTargets; - std::map ImportedTargets; + std::map TotalTargets; + std::map AliasTargets; + std::map ImportedTargets; std::vector EvaluationFiles; virtual const char* GetPredefinedTargetsFolder(); @@ -401,18 +401,18 @@ private: float FirstTimeProgress; // If you add a new map here, make sure it is copied // in EnableLanguagesFromGenerator - std::map IgnoreExtensions; - std::map LanguageEnabled; - std::set LanguagesReady; // Ready for try_compile - std::map OutputExtensions; - std::map LanguageToOutputExtension; - std::map ExtensionToLanguage; - std::map LanguageToLinkerPreference; - std::map LanguageToOriginalSharedLibFlags; + std::map IgnoreExtensions; + std::map LanguageEnabled; + std::set LanguagesReady; // Ready for try_compile + std::map OutputExtensions; + std::map LanguageToOutputExtension; + std::map ExtensionToLanguage; + std::map LanguageToLinkerPreference; + std::map LanguageToOriginalSharedLibFlags; // Record hashes for rules and outputs. struct RuleHash { char Data[32]; }; - std::map RuleHashes; + std::map RuleHashes; void CheckRuleHashes(); void CheckRuleHashes(std::string const& pfile, std::string const& home); void WriteRuleHashes(std::string const& pfile); @@ -448,18 +448,18 @@ private: virtual const char* GetBuildIgnoreErrorsFlag() const { return 0; } // Cache directory content and target files to be built. - struct DirectoryContent: public std::set + struct DirectoryContent: public std::set { - typedef std::set derived; + typedef std::set derived; bool LoadedFromDisk; DirectoryContent(): LoadedFromDisk(false) {} DirectoryContent(DirectoryContent const& dc): derived(dc), LoadedFromDisk(dc.LoadedFromDisk) {} }; - std::map DirectoryContentMap; + std::map DirectoryContentMap; // Set of binary directories on disk. - std::set BinaryDirectories; + std::set BinaryDirectories; // track targets to issue CMP0042 warning for. std::set CMP0042WarnTargets; diff --git a/Source/cmGlobalKdevelopGenerator.cxx b/Source/cmGlobalKdevelopGenerator.cxx index ed0e15ba9..25df953d5 100644 --- a/Source/cmGlobalKdevelopGenerator.cxx +++ b/Source/cmGlobalKdevelopGenerator.cxx @@ -44,7 +44,7 @@ void cmGlobalKdevelopGenerator::Generate() { // for each sub project in the project create // a kdevelop project - for (std::map >::const_iterator + for (std::map >::const_iterator it = this->GlobalGenerator->GetProjectMap().begin(); it!= this->GlobalGenerator->GetProjectMap().end(); ++it) @@ -103,7 +103,7 @@ bool cmGlobalKdevelopGenerator std::string projectDir = projectDirIn + "/"; std::string filename = outputDir+ "/" + projectname +".kdevelop.filelist"; - std::set files; + std::set files; std::string tmp; for (std::vector::const_iterator it=lgs.begin(); @@ -217,7 +217,7 @@ bool cmGlobalKdevelopGenerator } fileToOpen=""; - for (std::set::const_iterator it=files.begin(); + for (std::set::const_iterator it=files.begin(); it!=files.end(); it++) { // get the full path to the file diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 954fb1708..977b3a1c8 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -886,7 +886,7 @@ cmGlobalNinjaGenerator if (target->GetType() == cmTarget::GLOBAL_TARGET) { // Global targets only depend on other utilities, which may not appear in // the TargetDepends set (e.g. "all"). - std::set const& utils = target->GetUtilities(); + std::set const& utils = target->GetUtilities(); std::copy(utils.begin(), utils.end(), std::back_inserter(outputs)); } else { cmTargetDependSet const& targetDeps = diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index 735887e08..a392aa6fd 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -624,7 +624,7 @@ void cmGlobalUnixMakefileGenerator3 void cmGlobalUnixMakefileGenerator3 ::WriteConvenienceRules(std::ostream& ruleFileStream, - std::set &emitted) + std::set &emitted) { std::vector depends; std::vector commands; @@ -1049,7 +1049,7 @@ void cmGlobalUnixMakefileGenerator3::WriteHelpRule lg->AppendEcho(commands,"... depend"); // Keep track of targets already listed. - std::set emittedTargets; + std::set emittedTargets; // for each local generator unsigned int i; @@ -1084,8 +1084,8 @@ void cmGlobalUnixMakefileGenerator3::WriteHelpRule } } } - std::vector const& localHelp = lg->GetLocalHelp(); - for(std::vector::const_iterator o = localHelp.begin(); + std::vector const& localHelp = lg->GetLocalHelp(); + for(std::vector::const_iterator o = localHelp.begin(); o != localHelp.end(); ++o) { path = "... "; @@ -1102,9 +1102,9 @@ void cmGlobalUnixMakefileGenerator3::WriteHelpRule bool cmGlobalUnixMakefileGenerator3 ::NeedRequiresStep(cmTarget const& target) { - std::set languages; + std::set languages; target.GetLanguages(languages); - for(std::set::const_iterator l = languages.begin(); + for(std::set::const_iterator l = languages.begin(); l != languages.end(); ++l) { std::string var = "CMAKE_NEEDS_REQUIRES_STEP_"; diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h index ffdf6fb34..b61619d41 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.h +++ b/Source/cmGlobalUnixMakefileGenerator3.h @@ -96,7 +96,7 @@ public: // write the top level target rules void WriteConvenienceRules(std::ostream& ruleFileStream, - std::set &emitted); + std::set &emitted); /** Get the command to use for a target that has no rule. This is used for multiple output dependencies and for cmake_force. */ diff --git a/Source/cmGlobalVisualStudio6Generator.cxx b/Source/cmGlobalVisualStudio6Generator.cxx index 214b9eaa3..a7f65872b 100644 --- a/Source/cmGlobalVisualStudio6Generator.cxx +++ b/Source/cmGlobalVisualStudio6Generator.cxx @@ -260,7 +260,7 @@ void cmGlobalVisualStudio6Generator // output the DSW file void cmGlobalVisualStudio6Generator::OutputDSWFile() { - std::map >::iterator it; + std::map >::iterator it; for(it = this->ProjectMap.begin(); it!= this->ProjectMap.end(); ++it) { this->OutputDSWFile(it->second[0], it->second); @@ -318,7 +318,7 @@ void cmGlobalVisualStudio6Generator::WriteProject(std::ostream& fout, void cmGlobalVisualStudio6Generator::WriteExternalProject(std::ostream& fout, const std::string& name, const char* location, - const std::set& dependencies) + const std::set& dependencies) { fout << "#########################################################" "######################\n\n"; @@ -329,7 +329,7 @@ void cmGlobalVisualStudio6Generator::WriteExternalProject(std::ostream& fout, fout << "{{{\n"; - std::set::const_iterator i, end; + std::set::const_iterator i, end; // write dependencies. i = dependencies.begin(); end = dependencies.end(); diff --git a/Source/cmGlobalVisualStudio6Generator.h b/Source/cmGlobalVisualStudio6Generator.h index f1c70e468..3665f7b78 100644 --- a/Source/cmGlobalVisualStudio6Generator.h +++ b/Source/cmGlobalVisualStudio6Generator.h @@ -103,7 +103,7 @@ private: cmTarget const& t); void WriteExternalProject(std::ostream& fout, const std::string& name, const char* path, - const std::set& dependencies); + const std::set& dependencies); void WriteDSWFooter(std::ostream& fout); virtual std::string WriteUtilityDepend(cmTarget const* target); std::string MSDevCommand; diff --git a/Source/cmGlobalVisualStudio71Generator.cxx b/Source/cmGlobalVisualStudio71Generator.cxx index af1a5c57b..08bcc5b71 100644 --- a/Source/cmGlobalVisualStudio71Generator.cxx +++ b/Source/cmGlobalVisualStudio71Generator.cxx @@ -237,7 +237,7 @@ void cmGlobalVisualStudio71Generator const std::string& name, const char* location, const char* typeGuid, - const std::set& depends) + const std::set& depends) { fout << "Project(\"{" << (typeGuid ? typeGuid : this->ExternalProjectType(location)) @@ -252,7 +252,7 @@ void cmGlobalVisualStudio71Generator if(!depends.empty()) { fout << "\tProjectSection(ProjectDependencies) = postProject\n"; - std::set::const_iterator it; + std::set::const_iterator it; for(it = depends.begin(); it != depends.end(); ++it) { if(it->size() > 0) diff --git a/Source/cmGlobalVisualStudio71Generator.h b/Source/cmGlobalVisualStudio71Generator.h index 879146812..75cc6aeb9 100644 --- a/Source/cmGlobalVisualStudio71Generator.h +++ b/Source/cmGlobalVisualStudio71Generator.h @@ -72,7 +72,7 @@ protected: const std::string& name, const char* path, const char* typeGuid, - const std::set& depends); + const std::set& depends); virtual void WriteSLNHeader(std::ostream& fout); std::string ProjectConfigurationSectionName; diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index cf84fe396..2a97edc80 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -353,7 +353,7 @@ void cmGlobalVisualStudio7Generator // output the SLN file void cmGlobalVisualStudio7Generator::OutputSLNFile() { - std::map >::iterator it; + std::map >::iterator it; for(it = this->ProjectMap.begin(); it!= this->ProjectMap.end(); ++it) { this->OutputSLNFile(it->second[0], it->second); @@ -761,7 +761,7 @@ void cmGlobalVisualStudio7Generator::WriteExternalProject(std::ostream& fout, const std::string& name, const char* location, const char* typeGuid, - const std::set&) + const std::set&) { std::string d = cmSystemTools::ConvertToOutputPath(location); fout << "Project(" diff --git a/Source/cmGlobalVisualStudio7Generator.h b/Source/cmGlobalVisualStudio7Generator.h index 6fb373102..2e58f6c15 100644 --- a/Source/cmGlobalVisualStudio7Generator.h +++ b/Source/cmGlobalVisualStudio7Generator.h @@ -156,7 +156,7 @@ protected: const std::string& name, const char* path, const char* typeGuid, - const std::set& + const std::set& dependencies); std::string ConvertToSolutionPath(const char* path); @@ -164,7 +164,7 @@ protected: std::set IsPartOfDefaultBuild(const std::string& project, cmTarget const* target); std::vector Configurations; - std::map GUIDMap; + std::map GUIDMap; virtual void WriteFolders(std::ostream& fout); virtual void WriteFoldersContent(std::ostream& fout); diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx index 51825ee83..2ae1bbc17 100644 --- a/Source/cmGlobalVisualStudio8Generator.cxx +++ b/Source/cmGlobalVisualStudio8Generator.cxx @@ -338,7 +338,7 @@ void cmGlobalVisualStudio8Generator::Generate() if(this->AddCheckTarget()) { // All targets depend on the build-system check target. - for(std::map::const_iterator + for(std::map::const_iterator ti = this->TotalTargets.begin(); ti != this->TotalTargets.end(); ++ti) { @@ -436,7 +436,7 @@ bool cmGlobalVisualStudio8Generator::NeedLinkLibraryDependencies( cmTarget& target) { // Look for utility dependencies that magically link. - for(std::set::const_iterator ui = + for(std::set::const_iterator ui = target.GetUtilities().begin(); ui != target.GetUtilities().end(); ++ui) { diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index d388034e3..b2a705ecc 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -53,7 +53,7 @@ void cmGlobalVisualStudioGenerator::Generate() const char* no_working_dir = 0; std::vector no_depends; cmCustomCommandLines no_commands; - std::map >::iterator it; + std::map >::iterator it; for(it = this->ProjectMap.begin(); it!= this->ProjectMap.end(); ++it) { std::vector& gen = it->second; @@ -128,7 +128,7 @@ cmGlobalVisualStudioGenerator // Count the number of object files with each name. Note that // windows file names are not case sensitive. - std::map counts; + std::map counts; std::vector objectSources; gt->GetObjectSources(objectSources); for(std::vector::const_iterator @@ -380,7 +380,7 @@ bool cmGlobalVisualStudioGenerator::ComputeTargetDepends() { return false; } - std::map >::iterator it; + std::map >::iterator it; for(it = this->ProjectMap.begin(); it!= this->ProjectMap.end(); ++it) { std::vector& gen = it->second; @@ -852,7 +852,7 @@ bool cmGlobalVisualStudioGenerator::TargetIsFortranOnly(cmTarget const& target) { // check to see if this is a fortran build - std::set languages; + std::set languages; target.GetLanguages(languages); if(languages.size() == 1) { diff --git a/Source/cmGlobalVisualStudioGenerator.h b/Source/cmGlobalVisualStudioGenerator.h index b1fa838b5..dc0f9c71e 100644 --- a/Source/cmGlobalVisualStudioGenerator.h +++ b/Source/cmGlobalVisualStudioGenerator.h @@ -99,7 +99,7 @@ protected: virtual void AddPlatformDefinitions(cmMakefile* mf); virtual bool ComputeTargetDepends(); - class VSDependSet: public std::set {}; + class VSDependSet: public std::set {}; class VSDependMap: public std::map {}; VSDependMap VSTargetDepends; void ComputeVSTargetDepends(cmTarget&); @@ -108,7 +108,7 @@ protected: std::string GetUtilityForTarget(cmTarget& target, const std::string&); virtual std::string WriteUtilityDepend(cmTarget const*) = 0; std::string GetUtilityDepend(cmTarget const* target); - typedef std::map UtilityDependsMap; + typedef std::map UtilityDependsMap; UtilityDependsMap UtilityDepends; const char* AdditionalPlatformDefinition; diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index a1255a065..08e9adf43 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -337,7 +337,7 @@ cmLocalGenerator *cmGlobalXCodeGenerator::CreateLocalGenerator() //---------------------------------------------------------------------------- void cmGlobalXCodeGenerator::Generate() { - std::map >::iterator it; + std::map >::iterator it; // make sure extra targets are added before calling // the parent generate which will call trace depends for(it = this->ProjectMap.begin(); it!= this->ProjectMap.end(); ++it) @@ -570,7 +570,7 @@ void cmGlobalXCodeGenerator::addObject(cmXCodeObject *obj) { if(obj->GetType() == cmXCodeObject::OBJECT) { - cmStdString id = obj->GetId(); + std::string id = obj->GetId(); // If this is a duplicate id, it's an error: // @@ -631,17 +631,17 @@ cmXCodeObject* cmGlobalXCodeGenerator } //---------------------------------------------------------------------------- -cmStdString +std::string GetGroupMapKeyFromPath(cmTarget& cmtarget, const std::string& fullpath) { - cmStdString key(cmtarget.GetName()); + std::string key(cmtarget.GetName()); key += "-"; key += fullpath; return key; } //---------------------------------------------------------------------------- -cmStdString +std::string GetGroupMapKey(cmTarget& cmtarget, cmSourceFile* sf) { return GetGroupMapKeyFromPath(cmtarget, sf->GetFullPath()); @@ -844,7 +844,7 @@ cmGlobalXCodeGenerator::CreateXCodeFileReferenceFromPath( fileRef->SetComment(fname.c_str()); this->FileRefs[fname] = fileRef; } - cmStdString key = GetGroupMapKeyFromPath(cmtarget, fullpath); + std::string key = GetGroupMapKeyFromPath(cmtarget, fullpath); cmXCodeObject* group = this->GroupMap[key]; cmXCodeObject* children = group->GetObject("children"); if (!children->HasObject(fileRef)) @@ -1127,7 +1127,7 @@ cmGlobalXCodeGenerator::CreateXCodeTargets(cmLocalGenerator* gen, std::vector contentBuildPhases; if (isFrameworkTarget || isBundleTarget || isCFBundleTarget) { - typedef std::map > + typedef std::map > mapOfVectorOfSourceFiles; mapOfVectorOfSourceFiles bundleFiles; for(std::vector::const_iterator i = classes.begin(); @@ -1216,7 +1216,7 @@ cmGlobalXCodeGenerator::CreateXCodeTargets(cmLocalGenerator* gen, void cmGlobalXCodeGenerator::ForceLinkerLanguages() { // This makes sure all targets link using the proper language. - for(std::map::const_iterator + for(std::map::const_iterator ti = this->TotalTargets.begin(); ti != this->TotalTargets.end(); ++ti) { this->ForceLinkerLanguage(*ti->second); @@ -1477,7 +1477,7 @@ cmGlobalXCodeGenerator::AddCommandsToBuildPhase(cmXCodeObject* buildphase, // collect multiple outputs of custom commands into a set // which will be used for every configuration - std::map multipleOutputPairs; + std::map multipleOutputPairs; for(std::vector::const_iterator i = commands.begin(); i != commands.end(); ++i) { @@ -1548,8 +1548,8 @@ void cmGlobalXCodeGenerator std::vector const & commands, const char* configName, - const std::map& multipleOutputPairs + const std::map& multipleOutputPairs ) { std::string makefileName=makefileBasename; @@ -1571,7 +1571,7 @@ void cmGlobalXCodeGenerator // have all depend on all outputs makefileStream << "all: "; - std::map tname; + std::map tname; int count = 0; for(std::vector::const_iterator i = commands.begin(); i != commands.end(); ++i) @@ -1669,7 +1669,7 @@ void cmGlobalXCodeGenerator makefileStream << "\n# Dependencies of multiple outputs to their primary outputs \n"; - for(std::map::const_iterator o = + for(std::map::const_iterator o = multipleOutputPairs.begin(); o != multipleOutputPairs.end(); ++o) { makefileStream << o->first << ": " << o->second << "\n"; @@ -1678,7 +1678,7 @@ void cmGlobalXCodeGenerator makefileStream << "\n" "cmake_check_multiple_outputs:\n"; - for(std::map::const_iterator o = + for(std::map::const_iterator o = multipleOutputPairs.begin(); o != multipleOutputPairs.end(); ++o) { makefileStream << "\t@if [ ! -f " @@ -2088,7 +2088,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target, std::vector includes; this->CurrentLocalGenerator->GetIncludeDirectories(includes, gtgt, "C", configName); - std::set emitted; + std::set emitted; emitted.insert("/System/Library/Frameworks"); for(std::vector::iterator i = includes.begin(); i != includes.end(); ++i) @@ -2357,18 +2357,18 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target, { if(i->first.find("XCODE_ATTRIBUTE_") == 0) { - cmStdString attribute = i->first.substr(16); + std::string attribute = i->first.substr(16); // Handle [variant=] condition explicitly here. - cmStdString::size_type beginVariant = + std::string::size_type beginVariant = attribute.find("[variant="); - if (beginVariant != cmStdString::npos) + if (beginVariant != std::string::npos) { - cmStdString::size_type endVariant = + std::string::size_type endVariant = attribute.find("]", beginVariant+9); - if (endVariant != cmStdString::npos) + if (endVariant != std::string::npos) { // Compare the variant to the configuration. - cmStdString variant = + std::string variant = attribute.substr(beginVariant+9, endVariant-beginVariant-9); if (variant == configName) { @@ -2969,7 +2969,7 @@ void cmGlobalXCodeGenerator::CreateGroups(cmLocalGenerator* root, mf->FindSourceGroup(source.c_str(), sourceGroups); cmXCodeObject* pbxgroup = this->CreateOrGetPBXGroup(cmtarget, sourceGroup); - cmStdString key = GetGroupMapKey(cmtarget, sf); + std::string key = GetGroupMapKey(cmtarget, sf); this->GroupMap[key] = pbxgroup; } @@ -2984,7 +2984,7 @@ void cmGlobalXCodeGenerator::CreateGroups(cmLocalGenerator* root, mf->FindSourceGroup(source.c_str(), sourceGroups); cmXCodeObject* pbxgroup = this->CreateOrGetPBXGroup(cmtarget, sourceGroup); - cmStdString key = GetGroupMapKeyFromPath(cmtarget, source); + std::string key = GetGroupMapKeyFromPath(cmtarget, source); this->GroupMap[key] = pbxgroup; } } @@ -2992,7 +2992,7 @@ void cmGlobalXCodeGenerator::CreateGroups(cmLocalGenerator* root, } cmXCodeObject *cmGlobalXCodeGenerator -::CreatePBXGroup(cmXCodeObject *parent, cmStdString name) +::CreatePBXGroup(cmXCodeObject *parent, std::string name) { cmXCodeObject* parentChildren = NULL; if(parent) @@ -3016,8 +3016,8 @@ cmXCodeObject *cmGlobalXCodeGenerator cmXCodeObject* cmGlobalXCodeGenerator ::CreateOrGetPBXGroup(cmTarget& cmtarget, cmSourceGroup* sg) { - cmStdString s; - cmStdString target; + std::string s; + std::string target; const char *targetFolder= cmtarget.GetProperty("FOLDER"); if(targetFolder) { target = targetFolder; @@ -3026,7 +3026,7 @@ cmXCodeObject* cmGlobalXCodeGenerator target += cmtarget.GetName(); s = target + "/"; s += sg->GetFullName(); - std::map::iterator it = + std::map::iterator it = this->GroupNameMap.find(s); if(it != this->GroupNameMap.end()) { @@ -3043,7 +3043,7 @@ cmXCodeObject* cmGlobalXCodeGenerator { std::vector tgt_folders = cmSystemTools::tokenize(target, "/"); - cmStdString curr_tgt_folder; + std::string curr_tgt_folder; for(std::vector::size_type i = 0; i < tgt_folders.size();i++) { if (i != 0) @@ -3070,7 +3070,7 @@ cmXCodeObject* cmGlobalXCodeGenerator // If it's the default source group (empty name) then put the source file // directly in the tgroup... // - if (cmStdString(sg->GetFullName()) == "") + if (std::string(sg->GetFullName()) == "") { this->GroupNameMap[s] = tgroup; return tgroup; @@ -3081,12 +3081,12 @@ cmXCodeObject* cmGlobalXCodeGenerator { std::vector folders = cmSystemTools::tokenize(sg->GetFullName(), "\\"); - cmStdString curr_folder = target; + std::string curr_folder = target; curr_folder += "/"; for(std::vector::size_type i = 0; i < folders.size();i++) { curr_folder += folders[i]; - std::map::iterator i_folder = + std::map::iterator i_folder = this->GroupNameMap.find(curr_folder); //Create new folder if(i_folder == this->GroupNameMap.end()) @@ -3466,14 +3466,14 @@ cmGlobalXCodeGenerator::CreateXCodeDependHackTarget( makefileStream << "# For each target create a dummy rule " "so the target does not have to exist\n"; - std::set emitted; + std::set emitted; for(std::vector::iterator i = targets.begin(); i != targets.end(); ++i) { cmXCodeObject* target = *i; - std::map const& deplibs = + std::map const& deplibs = target->GetDependLibraries(); - for(std::map::const_iterator ci + for(std::map::const_iterator ci = deplibs.begin(); ci != deplibs.end(); ++ci) { for(cmXCodeObject::StringVec::const_iterator d = ci->second.begin(); @@ -3529,12 +3529,12 @@ cmGlobalXCodeGenerator::CreateXCodeDependHackTarget( std::string trel = this->ConvertToRelativeForMake(tfull.c_str()); // Add this target to the post-build phases of its dependencies. - std::map::const_iterator + std::map::const_iterator y = target->GetDependTargets().find(*ct); if(y != target->GetDependTargets().end()) { - std::vector const& deptgts = y->second; - for(std::vector::const_iterator d = deptgts.begin(); + std::vector const& deptgts = y->second; + for(std::vector::const_iterator d = deptgts.begin(); d != deptgts.end(); ++d) { makefileStream << this->PostBuildMakeTarget(*d, *ct) << ": " @@ -3546,12 +3546,12 @@ cmGlobalXCodeGenerator::CreateXCodeDependHackTarget( makefileStream << trel << ":"; // List dependencies if any exist. - std::map::const_iterator + std::map::const_iterator x = target->GetDependLibraries().find(*ct); if(x != target->GetDependLibraries().end()) { - std::vector const& deplibs = x->second; - for(std::vector::const_iterator d = deplibs.begin(); + std::vector const& deplibs = x->second; + for(std::vector::const_iterator d = deplibs.begin(); d != deplibs.end(); ++d) { makefileStream << "\\\n\t" << @@ -3960,7 +3960,7 @@ cmGlobalXCodeGenerator // names since Xcode names them uniquely automatically with a numeric suffix // to avoid exact duplicate file names. Note that Mac file names are not // typically case sensitive, hence the LowerCase. - std::map counts; + std::map counts; std::vector objectSources; gt->GetObjectSources(objectSources); for(std::vector::const_iterator diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h index 8e2de9a75..d2dd491f3 100644 --- a/Source/cmGlobalXCodeGenerator.h +++ b/Source/cmGlobalXCodeGenerator.h @@ -95,7 +95,7 @@ private: cmXCodeObject* CreateOrGetPBXGroup(cmTarget& cmtarget, cmSourceGroup* sg); cmXCodeObject* CreatePBXGroup(cmXCodeObject *parent, - cmStdString name); + std::string name); void CreateGroups(cmLocalGenerator* root, std::vector& generators); @@ -124,7 +124,7 @@ private: cmTarget& target, std::vector const & commands, const char* configName, - const std::map& + const std::map& multipleOutputPairs ); @@ -211,7 +211,7 @@ protected: unsigned int XcodeVersion; std::string VersionString; - std::set XCodeObjectIDs; + std::set XCodeObjectIDs; std::vector XCodeObjects; cmXCodeObject* RootObject; private: @@ -236,14 +236,14 @@ private: std::string CurrentReRunCMakeMakefile; std::string CurrentXCodeHackMakefile; std::string CurrentProject; - std::set TargetDoneSet; + std::set TargetDoneSet; std::vector CurrentOutputDirectoryComponents; std::vector ProjectSourceDirectoryComponents; std::vector ProjectOutputDirectoryComponents; - std::map GroupMap; - std::map GroupNameMap; - std::map TargetGroup; - std::map FileRefs; + std::map GroupMap; + std::map GroupNameMap; + std::map TargetGroup; + std::map FileRefs; std::vector Architectures; std::string PlatformToolset; }; diff --git a/Source/cmGraphVizWriter.cxx b/Source/cmGraphVizWriter.cxx index 6173d219a..22cba899b 100644 --- a/Source/cmGraphVizWriter.cxx +++ b/Source/cmGraphVizWriter.cxx @@ -121,7 +121,7 @@ void cmGraphVizWriter::ReadSettings(const char* settingsFileName, __set_bool_if_set(this->GeneratePerTarget, "GRAPHVIZ_GENERATE_PER_TARGET"); __set_bool_if_set(this->GenerateDependers, "GRAPHVIZ_GENERATE_DEPENDERS"); - cmStdString ignoreTargetsRegexes; + std::string ignoreTargetsRegexes; __set_if_set(ignoreTargetsRegexes, "GRAPHVIZ_IGNORE_TARGETS"); this->TargetsToIgnoreRegex.clear(); @@ -135,7 +135,7 @@ void cmGraphVizWriter::ReadSettings(const char* settingsFileName, itvIt != ignoreTargetsRegExVector.end(); ++ itvIt ) { - cmStdString currentRegexString(*itvIt); + std::string currentRegexString(*itvIt); cmsys::RegularExpression currentRegex; if (!currentRegex.compile(currentRegexString.c_str())) { @@ -160,7 +160,7 @@ void cmGraphVizWriter::WriteTargetDependersFiles(const char* fileName) this->CollectTargetsAndLibs(); - for(std::map::const_iterator ptrIt = + for(std::map::const_iterator ptrIt = this->TargetPtrs.begin(); ptrIt != this->TargetPtrs.end(); ++ptrIt) @@ -211,7 +211,7 @@ void cmGraphVizWriter::WritePerTargetFiles(const char* fileName) this->CollectTargetsAndLibs(); - for(std::map::const_iterator ptrIt = + for(std::map::const_iterator ptrIt = this->TargetPtrs.begin(); ptrIt != this->TargetPtrs.end(); ++ptrIt) @@ -265,7 +265,7 @@ void cmGraphVizWriter::WriteGlobalFile(const char* fileName) std::set insertedConnections; std::set insertedNodes; - for(std::map::const_iterator ptrIt = + for(std::map::const_iterator ptrIt = this->TargetPtrs.begin(); ptrIt != this->TargetPtrs.end(); ++ptrIt) @@ -305,7 +305,7 @@ void cmGraphVizWriter::WriteConnections(const std::string& targetName, std::set& insertedConnections, cmGeneratedFileStream& str) const { - std::map::const_iterator targetPtrIt = + std::map::const_iterator targetPtrIt = this->TargetPtrs.find(targetName); if (targetPtrIt == this->TargetPtrs.end()) // not found at all @@ -331,7 +331,7 @@ void cmGraphVizWriter::WriteConnections(const std::string& targetName, ++ llit ) { const char* libName = llit->first.c_str(); - std::map::const_iterator libNameIt = + std::map::const_iterator libNameIt = this->TargetNamesNodes.find(libName); // can happen e.g. if GRAPHVIZ_TARGET_IGNORE_REGEX is used @@ -364,7 +364,7 @@ void cmGraphVizWriter::WriteDependerConnections(const std::string& targetName, std::set& insertedConnections, cmGeneratedFileStream& str) const { - std::map::const_iterator targetPtrIt = + std::map::const_iterator targetPtrIt = this->TargetPtrs.find(targetName); if (targetPtrIt == this->TargetPtrs.end()) // not found at all @@ -383,7 +383,7 @@ void cmGraphVizWriter::WriteDependerConnections(const std::string& targetName, std::string myNodeName = this->TargetNamesNodes.find(targetName)->second; // now search who links against me - for(std::map::const_iterator dependerIt = + for(std::map::const_iterator dependerIt = this->TargetPtrs.begin(); dependerIt != this->TargetPtrs.end(); ++dependerIt) @@ -411,7 +411,7 @@ void cmGraphVizWriter::WriteDependerConnections(const std::string& targetName, if (libName == targetName) { // So this target links against targetName. - std::map::const_iterator dependerNodeNameIt = + std::map::const_iterator dependerNodeNameIt = this->TargetNamesNodes.find(dependerIt->first); if(dependerNodeNameIt != this->TargetNamesNodes.end()) @@ -452,7 +452,7 @@ void cmGraphVizWriter::WriteNode(const std::string& targetName, if (insertedNodes.find(targetName) == insertedNodes.end()) { insertedNodes.insert(targetName); - std::map::const_iterator nameIt = + std::map::const_iterator nameIt = this->TargetNamesNodes.find(targetName); str << " \"" << nameIt->second.c_str() << "\" [ label=\"" @@ -540,7 +540,7 @@ int cmGraphVizWriter::CollectAllExternalLibs(int cnt) continue; } - std::map::const_iterator tarIt = + std::map::const_iterator tarIt = this->TargetPtrs.find(libName); if ( tarIt == this->TargetPtrs.end() ) { diff --git a/Source/cmGraphVizWriter.h b/Source/cmGraphVizWriter.h index 6af460b73..a7acd0e54 100644 --- a/Source/cmGraphVizWriter.h +++ b/Source/cmGraphVizWriter.h @@ -64,10 +64,10 @@ protected: bool GenerateForTargetType(cmTarget::TargetType targetType) const; - cmStdString GraphType; - cmStdString GraphName; - cmStdString GraphHeader; - cmStdString GraphNodePrefix; + std::string GraphType; + std::string GraphName; + std::string GraphHeader; + std::string GraphNodePrefix; bool GenerateForExecutables; bool GenerateForStaticLibs; @@ -81,9 +81,9 @@ protected: const std::vector& LocalGenerators; - std::map TargetPtrs; + std::map TargetPtrs; // maps from the actual target names to node names in dot: - std::map TargetNamesNodes; + std::map TargetNamesNodes; bool HaveTargetsAndLibs; }; diff --git a/Source/cmIDEOptions.cxx b/Source/cmIDEOptions.cxx index 34a9c7c78..e03223f76 100644 --- a/Source/cmIDEOptions.cxx +++ b/Source/cmIDEOptions.cxx @@ -108,7 +108,7 @@ bool cmIDEOptions::CheckFlagTable(cmIDEFlagTable const* table, { const char *new_value = flag+1+n; - std::map::iterator itr; + std::map::iterator itr; itr = this->FlagMap.find(entry->IDEName); if(itr != this->FlagMap.end()) { @@ -186,7 +186,7 @@ void cmIDEOptions::RemoveFlag(const char* flag) //---------------------------------------------------------------------------- const char* cmIDEOptions::GetFlag(const char* flag) { - std::map::iterator i = this->FlagMap.find(flag); + std::map::iterator i = this->FlagMap.find(flag); if(i != this->FlagMap.end()) { return i->second.c_str(); diff --git a/Source/cmIDEOptions.h b/Source/cmIDEOptions.h index e78af3ee4..691893f6d 100644 --- a/Source/cmIDEOptions.h +++ b/Source/cmIDEOptions.h @@ -40,13 +40,13 @@ protected: // Then parse the command line flags specified in CMAKE_CXX_FLAGS // and CMAKE_C_FLAGS // and overwrite or add new values to this map - std::map FlagMap; + std::map FlagMap; // Preprocessor definitions. std::vector Defines; // Unrecognized flags that get no special handling. - cmStdString FlagString; + std::string FlagString; bool DoingDefine; bool AllowDefine; diff --git a/Source/cmIncludeDirectoryCommand.cxx b/Source/cmIncludeDirectoryCommand.cxx index e20fe022d..df5508e5d 100644 --- a/Source/cmIncludeDirectoryCommand.cxx +++ b/Source/cmIncludeDirectoryCommand.cxx @@ -38,7 +38,7 @@ bool cmIncludeDirectoryCommand std::vector beforeIncludes; std::vector afterIncludes; - std::set systemIncludes; + std::set systemIncludes; for(; i != args.end(); ++i) { diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx index 0878aae59..94d20913f 100644 --- a/Source/cmInstallCommand.cxx +++ b/Source/cmInstallCommand.cxx @@ -97,7 +97,7 @@ bool cmInstallCommand::InitialPass(std::vector const& args, } // Unknown mode. - cmStdString e = "called with unknown mode "; + std::string e = "called with unknown mode "; e += args[0]; this->SetError(e.c_str()); return false; diff --git a/Source/cmInstallExportGenerator.cxx b/Source/cmInstallExportGenerator.cxx index 1287ea659..045cff649 100644 --- a/Source/cmInstallExportGenerator.cxx +++ b/Source/cmInstallExportGenerator.cxx @@ -177,7 +177,7 @@ cmInstallExportGenerator::GenerateScriptConfigs(std::ostream& os, // Now create a configuration-specific install rule for the import // file of each configuration. std::vector files; - for(std::map::const_iterator + for(std::map::const_iterator i = this->EFGen->GetConfigImportFiles().begin(); i != this->EFGen->GetConfigImportFiles().end(); ++i) { diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx index 7a39f457d..5df6e4bcd 100644 --- a/Source/cmInstallTargetGenerator.cxx +++ b/Source/cmInstallTargetGenerator.cxx @@ -513,7 +513,7 @@ cmInstallTargetGenerator // Build a map of build-tree install_name to install-tree install_name for // shared libraries linked to this target. - std::map install_name_remap; + std::map install_name_remap; if(cmComputeLinkInformation* cli = this->Target->GetLinkInformation(config)) { std::set const& sharedLibs @@ -590,7 +590,7 @@ cmInstallTargetGenerator { os << "\n" << indent << " -id \"" << new_id << "\""; } - for(std::map::const_iterator + for(std::map::const_iterator i = install_name_remap.begin(); i != install_name_remap.end(); ++i) { diff --git a/Source/cmLoadCacheCommand.cxx b/Source/cmLoadCacheCommand.cxx index dfd98fa5f..806d8212f 100644 --- a/Source/cmLoadCacheCommand.cxx +++ b/Source/cmLoadCacheCommand.cxx @@ -33,7 +33,7 @@ bool cmLoadCacheCommand // and they can not be overridden. bool excludeFiles=false; unsigned int i; - std::set excludes; + std::set excludes; for(i=0; i includes; + std::set includes; for(i=0; i VariablesToRead; + std::set VariablesToRead; std::string Prefix; bool ReadWithPrefix(std::vector const& args); diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 75f2130a5..e36266a7f 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -617,8 +617,8 @@ void cmLocalGenerator::AddCustomCommandToCreateObject(const char* ofname, // Parse the string to get the custom command line. cmCustomCommandLine commandLine; - std::vector cmd = cmSystemTools::ParseArguments(i->c_str()); - for(std::vector::iterator a = cmd.begin(); + std::vector cmd = cmSystemTools::ParseArguments(i->c_str()); + for(std::vector::iterator a = cmd.begin(); a != cmd.end(); ++a) { commandLine.push_back(*a); @@ -656,7 +656,7 @@ void cmLocalGenerator::AddCustomCommandToCreateObject(const char* ofname, void cmLocalGenerator::AddBuildTargetRule(const std::string& llang, cmGeneratorTarget& target) { - cmStdString objs; + std::string objs; std::vector objVector; // Add all the sources outputs to the depends of the target std::vector classes; @@ -728,8 +728,8 @@ void cmLocalGenerator::AddBuildTargetRule(const std::string& llang, this->ExpandRuleVariables(*i, vars); // Parse the string to get the custom command line. cmCustomCommandLine commandLine; - std::vector cmd = cmSystemTools::ParseArguments(i->c_str()); - for(std::vector::iterator a = cmd.begin(); + std::vector cmd = cmSystemTools::ParseArguments(i->c_str()); + for(std::vector::iterator a = cmd.begin(); a != cmd.end(); ++a) { commandLine.push_back(*a); @@ -758,7 +758,7 @@ void cmLocalGenerator::AddBuildTargetRule(const std::string& llang, void cmLocalGenerator -::CreateCustomTargetsAndCommands(std::set const& lang) +::CreateCustomTargetsAndCommands(std::set const& lang) { cmGeneratorTargetsType tgts = this->Makefile->GetGeneratorTargets(); for(cmGeneratorTargetsType::iterator l = tgts.begin(); @@ -1344,7 +1344,7 @@ std::string cmLocalGenerator::GetIncludeFlags( this->Makefile->GetDefinition(fwSearchFlagVar.c_str()); bool flagUsed = false; - std::set emitted; + std::set emitted; #ifdef __APPLE__ emitted.insert("/System/Library/Frameworks"); #endif @@ -1488,7 +1488,7 @@ void cmLocalGenerator::GetIncludeDirectories(std::vector& dirs, } // Do not repeat an include path. - std::set emitted; + std::set emitted; // Store the automatic include paths. if(includeBinaryDir) @@ -2988,7 +2988,7 @@ cmLocalGenerator std::string const& dir_max) { // Look for an existing mapped name for this object file. - std::map::iterator it = + std::map::iterator it = this->UniqueObjectNamesMap.find(sin); // If no entry exists create one. @@ -3071,7 +3071,7 @@ cmLocalGenerator #endif // Insert the newly mapped object file name. - std::map::value_type e(sin, ssin); + std::map::value_type e(sin, ssin); it = this->UniqueObjectNamesMap.insert(e).first; } diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index 633be5d9b..3fe6a26de 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -406,7 +406,7 @@ protected: // generator directly. Any targets containing files that are not // of the types listed will be compiled as custom commands and added // to a custom target. - void CreateCustomTargetsAndCommands(std::set const&); + void CreateCustomTargetsAndCommands(std::set const&); // Handle old-style install rules stored in the targets. void GenerateTargetInstallRules( @@ -443,9 +443,9 @@ protected: std::vector StartOutputDirectoryComponents; cmLocalGenerator* Parent; std::vector Children; - std::map UniqueObjectNamesMap; + std::map UniqueObjectNamesMap; std::string::size_type ObjectPathMax; - std::set ObjectMaxPathViolations; + std::set ObjectMaxPathViolations; bool WindowsShell; bool WindowsVSIDE; bool WatcomWMake; diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index f47ea299d..251661391 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -190,7 +190,7 @@ void cmLocalUnixMakefileGenerator3::AddLocalObjectFile( void cmLocalUnixMakefileGenerator3::GetIndividualFileTargets (std::vector& targets) { - for (std::map::iterator lo = + for (std::map::iterator lo = this->LocalObjectFiles.begin(); lo != this->LocalObjectFiles.end(); ++lo) { @@ -235,7 +235,7 @@ void cmLocalUnixMakefileGenerator3::WriteLocalMakefile() // only write local targets unless at the top Keep track of targets already // listed. - std::set emittedTargets; + std::set emittedTargets; if (this->Parent) { // write our targets, and while doing it collect up the object @@ -256,7 +256,7 @@ void cmLocalUnixMakefileGenerator3::WriteLocalMakefile() // now write out the object rules // for each object file name - for (std::map::iterator lo = + for (std::map::iterator lo = this->LocalObjectFiles.begin(); lo != this->LocalObjectFiles.end(); ++lo) { @@ -371,7 +371,7 @@ cmLocalUnixMakefileGenerator3 //---------------------------------------------------------------------------- void cmLocalUnixMakefileGenerator3 ::WriteLocalMakefileTargets(std::ostream& ruleFileStream, - std::set &emitted) + std::set &emitted) { std::vector depends; std::vector commands; @@ -1196,12 +1196,12 @@ cmLocalUnixMakefileGenerator3 if(!filename) { // Get the set of source languages in the target. - std::set languages; + std::set languages; target.GetLanguages(languages); fout << "\n" << "# Per-language clean rules from dependency scanning.\n" << "foreach(lang"; - for(std::set::const_iterator l = languages.begin(); + for(std::set::const_iterator l = languages.begin(); l != languages.end(); ++l) { fout << " " << *l; @@ -1317,7 +1317,7 @@ cmLocalUnixMakefileGenerator3 // see if the variable has been defined before and return // the modified version of the variable - std::map::iterator i = + std::map::iterator i = this->MakeVariableMap.find(unmodified); if(i != this->MakeVariableMap.end()) { @@ -1721,7 +1721,7 @@ void cmLocalUnixMakefileGenerator3 { text = "Running external command ..."; } - std::set::const_iterator dit; + std::set::const_iterator dit; for ( dit = glIt->second.GetUtilities().begin(); dit != glIt->second.GetUtilities().end(); ++ dit ) diff --git a/Source/cmLocalUnixMakefileGenerator3.h b/Source/cmLocalUnixMakefileGenerator3.h index 2ad525037..37ee87474 100644 --- a/Source/cmLocalUnixMakefileGenerator3.h +++ b/Source/cmLocalUnixMakefileGenerator3.h @@ -211,11 +211,11 @@ public: // File pairs for implicit dependency scanning. The key of the map // is the depender and the value is the explicit dependee. struct ImplicitDependFileMap: - public std::map {}; + public std::map {}; struct ImplicitDependLanguageMap: - public std::map {}; + public std::map {}; struct ImplicitDependTargetMap: - public std::map {}; + public std::map {}; ImplicitDependLanguageMap const& GetImplicitDepends(cmTarget const& tgt); void AddImplicitDepends(cmTarget const& tgt, const std::string& lang, @@ -231,7 +231,7 @@ public: std::string objNoTargetDir, bool hasSourceExtension); - std::vector const& GetLocalHelp() { return this->LocalHelp; } + std::vector const& GetLocalHelp() { return this->LocalHelp; } /** Get whether to create rules to generate preprocessed and assembly sources. This could be converted to a variable lookup @@ -256,7 +256,7 @@ protected: // write the target rules for the local Makefile into the stream void WriteLocalMakefileTargets(std::ostream& ruleFileStream, - std::set &emitted); + std::set &emitted); // this method Writes the Directory information files void WriteDirectoryInformationFile(); @@ -370,16 +370,16 @@ private: LocalObjectInfo():HasSourceExtension(false), HasPreprocessRule(false), HasAssembleRule(false) {} }; - std::map LocalObjectFiles; + std::map LocalObjectFiles; void WriteObjectConvenienceRule(std::ostream& ruleFileStream, const char* comment, const char* output, LocalObjectInfo const& info); - std::vector LocalHelp; + std::vector LocalHelp; /* does the work for each target */ - std::map MakeVariableMap; - std::map ShortMakeVariableMap; + std::map MakeVariableMap; + std::map ShortMakeVariableMap; }; #endif diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx index a5ac629ea..b0c577ecb 100644 --- a/Source/cmLocalVisualStudio6Generator.cxx +++ b/Source/cmLocalVisualStudio6Generator.cxx @@ -80,7 +80,7 @@ private: void cmLocalVisualStudio6Generator::AddHelperCommands() { - std::set lang; + std::set lang; lang.insert("C"); lang.insert("CXX"); this->CreateCustomTargetsAndCommands(lang); @@ -426,7 +426,7 @@ void cmLocalVisualStudio6Generator } // Add per-source and per-configuration preprocessor definitions. - std::map cdmap; + std::map cdmap; { std::set targetCompileDefinitions; @@ -526,7 +526,7 @@ void cmLocalVisualStudio6Generator { fout << "\n# ADD CPP " << compileFlags << "\n\n"; } - std::map::iterator cdi = + std::map::iterator cdi = cdmap.find(cmSystemTools::UpperCase(config)); if(cdi != cdmap.end() && !cdi->second.empty()) { diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index 7b921a3d0..6ad5e04e9 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -59,7 +59,7 @@ cmLocalVisualStudio7Generator::~cmLocalVisualStudio7Generator() void cmLocalVisualStudio7Generator::AddHelperCommands() { - std::set lang; + std::set lang; lang.insert("C"); lang.insert("CXX"); lang.insert("RC"); @@ -1468,7 +1468,7 @@ public: cmTarget& target, cmSourceFile const& sf, std::vector* configs); - std::map FileConfigMap; + std::map FileConfigMap; }; cmLocalVisualStudio7GeneratorFCInfo @@ -1712,7 +1712,7 @@ bool cmLocalVisualStudio7Generator aCompilerTool = "VFCustomBuildTool"; } } - for(std::map::const_iterator + for(std::map::const_iterator fci = fcinfo.FileConfigMap.begin(); fci != fcinfo.FileConfigMap.end(); ++fci) { diff --git a/Source/cmMakeDepend.h b/Source/cmMakeDepend.h index 2419ae9a8..2c9d51541 100644 --- a/Source/cmMakeDepend.h +++ b/Source/cmMakeDepend.h @@ -138,10 +138,10 @@ protected: cmsys::RegularExpression IncludeFileRegularExpression; cmsys::RegularExpression ComplainFileRegularExpression; std::vector IncludeDirectories; - typedef std::map FileToPathMapType; - typedef std::map + typedef std::map FileToPathMapType; + typedef std::map DirectoryToFileToPathMapType; - typedef std::map + typedef std::map DependInformationMapType; DependInformationMapType DependInformationMap; DirectoryToFileToPathMapType DirectoryToFileToPathMap; diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 71985233d..d107ddf97 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -45,8 +45,8 @@ class cmMakefile::Internals { public: std::stack > VarStack; - std::stack > VarInitStack; - std::stack > VarUsageStack; + std::stack > VarInitStack; + std::stack > VarUsageStack; bool IsSourceFileTryCompile; }; @@ -54,7 +54,7 @@ public: cmMakefile::cmMakefile(): Internal(new Internals) { const cmDefinitions& defs = cmDefinitions(); - const std::set globalKeys = defs.LocalKeys(); + const std::set globalKeys = defs.LocalKeys(); this->Internal->VarStack.push(defs); this->Internal->VarInitStack.push(globalKeys); this->Internal->VarUsageStack.push(globalKeys); @@ -203,7 +203,7 @@ cmMakefile::~cmMakefile() { delete *i; } - for(std::map::iterator i = this->Tests.begin(); + for(std::map::iterator i = this->Tests.begin(); i != this->Tests.end(); ++i) { delete i->second; @@ -247,10 +247,10 @@ void cmMakefile::PrintStringVector(const char* s, void cmMakefile ::PrintStringVector(const char* s, - const std::vector >& v) const + const std::vector >& v) const { std::cout << s << ": ( \n"; - for(std::vector >::const_iterator i + for(std::vector >::const_iterator i = v.begin(); i != v.end(); ++i) { std::cout << i->first.c_str() << " " << i->second; @@ -1746,9 +1746,9 @@ void cmMakefile::AddIncludeDirectories(const std::vector &incs, //---------------------------------------------------------------------------- void -cmMakefile::AddSystemIncludeDirectories(const std::set &incs) +cmMakefile::AddSystemIncludeDirectories(const std::set &incs) { - for(std::set::const_iterator li = incs.begin(); + for(std::set::const_iterator li = incs.begin(); li != incs.end(); ++li) { this->SystemIncludeDirectories.insert(*li); @@ -1865,8 +1865,8 @@ void cmMakefile::CheckForUnusedVariables() const return; } const cmDefinitions& defs = this->Internal->VarStack.top(); - const std::set& locals = defs.LocalKeys(); - std::set::const_iterator it = locals.begin(); + const std::set& locals = defs.LocalKeys(); + std::set::const_iterator it = locals.begin(); for (; it != locals.end(); ++it) { this->CheckForUnused("out of scope", it->c_str()); @@ -1903,7 +1903,7 @@ void cmMakefile::CheckForUnused(const char* reason, { if (this->WarnUnused && !this->VariableUsed(name)) { - cmStdString path; + std::string path; cmListFileBacktrace bt; if (this->CallStack.size()) { @@ -2487,7 +2487,7 @@ const char* cmMakefile::GetSafeDefinition(const std::string& def) const std::vector cmMakefile ::GetDefinitions(int cacheonly /* = 0 */) const { - std::set definitions; + std::set definitions; if ( !cacheonly ) { definitions = this->Internal->VarStack.top().ClosureKeys(); @@ -2501,7 +2501,7 @@ std::vector cmMakefile std::vector res; - std::set::iterator fit; + std::set::iterator fit; for ( fit = definitions.begin(); fit != definitions.end(); fit ++ ) { res.push_back(*fit); @@ -3679,7 +3679,7 @@ const char *cmMakefile::GetProperty(const std::string& prop, } else if (prop == "LISTFILE_STACK") { - for (std::deque::const_iterator + for (std::deque::const_iterator i = this->ListFileStack.begin(); i != this->ListFileStack.end(); ++i) { @@ -3864,7 +3864,7 @@ cmTest* cmMakefile::CreateTest(const std::string& testName) //---------------------------------------------------------------------------- cmTest* cmMakefile::GetTest(const std::string& testName) const { - std::map::const_iterator + std::map::const_iterator mi = this->Tests.find(testName); if(mi != this->Tests.end()) { @@ -3903,7 +3903,7 @@ std::string cmMakefile::GetListFileStack() const size_t depth = this->ListFileStack.size(); if (depth > 0) { - std::deque::const_iterator it = this->ListFileStack.end(); + std::deque::const_iterator it = this->ListFileStack.end(); do { if (depth != this->ListFileStack.size()) @@ -3926,8 +3926,8 @@ std::string cmMakefile::GetListFileStack() const void cmMakefile::PushScope() { cmDefinitions* parent = &this->Internal->VarStack.top(); - const std::set& init = this->Internal->VarInitStack.top(); - const std::set& usage = this->Internal->VarUsageStack.top(); + const std::set& init = this->Internal->VarInitStack.top(); + const std::set& usage = this->Internal->VarUsageStack.top(); this->Internal->VarStack.push(cmDefinitions(parent)); this->Internal->VarInitStack.push(init); this->Internal->VarUsageStack.push(usage); @@ -3936,12 +3936,12 @@ void cmMakefile::PushScope() void cmMakefile::PopScope() { cmDefinitions* current = &this->Internal->VarStack.top(); - std::set init = this->Internal->VarInitStack.top(); - std::set usage = this->Internal->VarUsageStack.top(); - const std::set& locals = current->LocalKeys(); + std::set init = this->Internal->VarInitStack.top(); + std::set usage = this->Internal->VarUsageStack.top(); + const std::set& locals = current->LocalKeys(); // Remove initialization and usage information for variables in the local // scope. - std::set::const_iterator it = locals.begin(); + std::set::const_iterator it = locals.begin(); for (; it != locals.end(); ++it) { init.erase(*it); @@ -4054,7 +4054,7 @@ cmTarget* cmMakefile::FindTargetToUse(const std::string& name, { // Look for an imported target. These take priority because they // are more local in scope and do not have to be globally unique. - std::map::const_iterator + std::map::const_iterator imported = this->ImportedTargets.find(name); if(imported != this->ImportedTargets.end()) { diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 39635dda1..86cedb030 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -542,7 +542,7 @@ public: /** * Mark include directories as system directories. */ - void AddSystemIncludeDirectories(const std::set &incs); + void AddSystemIncludeDirectories(const std::set &incs); /** Expand out any arguements in the vector that have ; separated * strings into multiple arguements. A new vector is created @@ -876,7 +876,7 @@ public: void AddQtUiFileWithOptions(cmSourceFile *sf); std::vector GetQtUiFilesWithOptions() const; - std::set const & GetSystemIncludeDirectories() const + std::set const & GetSystemIncludeDirectories() const { return this->SystemIncludeDirectories; } protected: @@ -904,14 +904,14 @@ protected: std::vector SourceFiles; // Tests - std::map Tests; + std::map Tests; // The link-library paths. Order matters, use std::vector (not std::set). std::vector LinkDirectories; // The set of include directories that are marked as system include // directories. - std::set SystemIncludeDirectories; + std::set SystemIncludeDirectories; std::vector ListFiles; // list of command files loaded std::vector OutputFiles; // list of command files loaded @@ -957,7 +957,7 @@ private: friend class cmMakeDepend; // make depend needs direct access // to the Sources array void PrintStringVector(const char* s, const - std::vector >& v) const; + std::vector >& v) const; void PrintStringVector(const char* s, const std::vector& v) const; @@ -968,10 +968,10 @@ private: void PushFunctionBlockerBarrier(); void PopFunctionBlockerBarrier(bool reportError = true); - typedef std::map StringStringMap; + typedef std::map StringStringMap; StringStringMap MacrosMap; - std::map SubDirectoryOrder; + std::map SubDirectoryOrder; mutable cmsys::RegularExpression cmDefineRegex; mutable cmsys::RegularExpression cmDefine01Regex; @@ -987,7 +987,7 @@ private: bool CheckSystemVars; // stack of list files being read - std::deque ListFileStack; + std::deque ListFileStack; // stack of commands being invoked. struct CallStackEntry @@ -1000,7 +1000,7 @@ private: friend class cmMakefileCall; std::vector ImportedTargetsOwned; - std::map ImportedTargets; + std::map ImportedTargets; // Internal policy stack management. void PushPolicy(bool weak = false, diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index fb9b0451d..0a836a564 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -342,21 +342,21 @@ std::string cmMakefileTargetGenerator::GetDefines(const std::string &l) void cmMakefileTargetGenerator::WriteTargetLanguageFlags() { // write language flags for target - std::set languages; + std::set languages; this->Target->GetLanguages(languages); // put the compiler in the rules.make file so that if it changes // things rebuild - for(std::set::const_iterator l = languages.begin(); + for(std::set::const_iterator l = languages.begin(); l != languages.end(); ++l) { - cmStdString compiler = "CMAKE_"; + std::string compiler = "CMAKE_"; compiler += *l; compiler += "_COMPILER"; *this->FlagFileStream << "# compile " << l->c_str() << " with " << this->Makefile->GetSafeDefinition(compiler.c_str()) << "\n"; } - for(std::set::const_iterator l = languages.begin(); + for(std::set::const_iterator l = languages.begin(); l != languages.end(); ++l) { *this->FlagFileStream << *l << "_FLAGS = " << this->GetFlags(*l) << "\n\n"; @@ -1531,7 +1531,7 @@ void cmMakefileTargetGenerator::WriteTargetDriverRule(const char* main_output, } // Make sure the extra files are built. - for(std::set::const_iterator i = this->ExtraFiles.begin(); + for(std::set::const_iterator i = this->ExtraFiles.begin(); i != this->ExtraFiles.end(); ++i) { depends.push_back(*i); @@ -1561,7 +1561,7 @@ std::string cmMakefileTargetGenerator::GetFrameworkFlags(std::string const& l) return std::string(); } - std::set emitted; + std::set emitted; #ifdef __APPLE__ /* don't insert this when crosscompiling e.g. to iphone */ emitted.insert("/System/Library/Frameworks"); #endif diff --git a/Source/cmMakefileTargetGenerator.h b/Source/cmMakefileTargetGenerator.h index d2cbaddb9..5f697a502 100644 --- a/Source/cmMakefileTargetGenerator.h +++ b/Source/cmMakefileTargetGenerator.h @@ -208,7 +208,7 @@ protected: std::string FlagFileNameFull; cmGeneratedFileStream *FlagFileStream; class StringList: public std::vector {}; - std::map FlagFileDepends; + std::map FlagFileDepends; // the stream for the info file std::string InfoFileNameFull; @@ -222,12 +222,12 @@ protected: std::vector ExternalObjects; // Set of object file names that will be built in this directory. - std::set ObjectFiles; + std::set ObjectFiles; // Set of extra output files to be driven by the build. - std::set ExtraFiles; + std::set ExtraFiles; - typedef std::map MultipleOutputPairsType; + typedef std::map MultipleOutputPairsType; MultipleOutputPairsType MultipleOutputPairs; // Target name info. @@ -238,11 +238,11 @@ protected: std::string TargetNamePDB; // Mac OS X content info. - std::set MacContentFolders; + std::set MacContentFolders; cmOSXBundleGenerator* OSXBundleGenerator; MacOSXContentGeneratorType* MacOSXContentGenerator; - typedef std::map ByLanguageMap; + typedef std::map ByLanguageMap; std::string GetFlags(const std::string &l); ByLanguageMap FlagsByLanguage; std::string GetDefines(const std::string &l); diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index 502127e50..a49fc2d7b 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -109,9 +109,9 @@ void cmNinjaNormalTargetGenerator::WriteLanguagesRules() << "\n\n"; #endif - std::set languages; + std::set languages; this->GetTarget()->GetLanguages(languages); - for(std::set::const_iterator l = languages.begin(); + for(std::set::const_iterator l = languages.begin(); l != languages.end(); ++l) this->WriteLanguageRules(*l); diff --git a/Source/cmNinjaTargetGenerator.h b/Source/cmNinjaTargetGenerator.h index e8ac81c61..b3b37a4c2 100644 --- a/Source/cmNinjaTargetGenerator.h +++ b/Source/cmNinjaTargetGenerator.h @@ -140,7 +140,7 @@ protected: MacOSXContentGeneratorType* MacOSXContentGenerator; // Properly initialized by sub-classes. cmOSXBundleGenerator* OSXBundleGenerator; - std::set MacContentFolders; + std::set MacContentFolders; void addPoolNinjaVariable(const char* pool_property, cmTarget* target, diff --git a/Source/cmOSXBundleGenerator.h b/Source/cmOSXBundleGenerator.h index 2f3639402..97ae7314b 100644 --- a/Source/cmOSXBundleGenerator.h +++ b/Source/cmOSXBundleGenerator.h @@ -52,7 +52,7 @@ public: MacOSXContentGeneratorType* generator); std::string InitMacOSXContentDirectory(const char* pkgloc); - void SetMacContentFolders(std::set* macContentFolders) + void SetMacContentFolders(std::set* macContentFolders) { this->MacContentFolders = macContentFolders; } private: @@ -63,7 +63,7 @@ private: cmMakefile* Makefile; cmLocalGenerator* LocalGenerator; const char* ConfigName; - std::set* MacContentFolders; + std::set* MacContentFolders; }; diff --git a/Source/cmOrderDirectories.cxx b/Source/cmOrderDirectories.cxx index 86beb9795..79677e368 100644 --- a/Source/cmOrderDirectories.cxx +++ b/Source/cmOrderDirectories.cxx @@ -138,9 +138,9 @@ bool cmOrderDirectoriesConstraint::FileMayConflict(std::string const& dir, } // Check if the file will be built by cmake. - std::set const& files = + std::set const& files = (this->GlobalGenerator->GetDirectoryContent(dir, false)); - std::set::const_iterator fi = files.find(name); + std::set::const_iterator fi = files.find(name); return fi != files.end(); } @@ -200,7 +200,7 @@ bool cmOrderDirectoriesConstraintSOName::FindConflict(std::string const& dir) { // We do not have the soname. Look for files in the directory // that may conflict. - std::set const& files = + std::set const& files = (this->GlobalGenerator ->GetDirectoryContent(dir, true)); @@ -208,9 +208,9 @@ bool cmOrderDirectoriesConstraintSOName::FindConflict(std::string const& dir) // know the soname just look at all files that start with the // file name. Usually the soname starts with the library name. std::string base = this->FileName; - std::set::const_iterator first = files.lower_bound(base); + std::set::const_iterator first = files.lower_bound(base); ++base[base.size()-1]; - std::set::const_iterator last = files.upper_bound(base); + std::set::const_iterator last = files.upper_bound(base); if(first != last) { return true; @@ -251,8 +251,8 @@ bool cmOrderDirectoriesConstraintLibrary::FindConflict(std::string const& dir) if(!this->OD->LinkExtensions.empty() && this->OD->RemoveLibraryExtension.find(this->FileName)) { - cmStdString lib = this->OD->RemoveLibraryExtension.match(1); - cmStdString ext = this->OD->RemoveLibraryExtension.match(2); + std::string lib = this->OD->RemoveLibraryExtension.match(1); + std::string ext = this->OD->RemoveLibraryExtension.match(2); for(std::vector::iterator i = this->OD->LinkExtensions.begin(); i != this->OD->LinkExtensions.end(); ++i) @@ -407,7 +407,7 @@ cmOrderDirectories //---------------------------------------------------------------------------- void cmOrderDirectories -::SetImplicitDirectories(std::set const& implicitDirs) +::SetImplicitDirectories(std::set const& implicitDirs) { this->ImplicitDirectories = implicitDirs; } @@ -444,11 +444,11 @@ void cmOrderDirectories::CollectOriginalDirectories() int cmOrderDirectories::AddOriginalDirectory(std::string const& dir) { // Add the runtime directory with a unique index. - std::map::iterator i = + std::map::iterator i = this->DirectoryIndex.find(dir); if(i == this->DirectoryIndex.end()) { - std::map::value_type + std::map::value_type entry(dir, static_cast(this->OriginalDirectories.size())); i = this->DirectoryIndex.insert(entry).first; this->OriginalDirectories.push_back(dir); diff --git a/Source/cmOrderDirectories.h b/Source/cmOrderDirectories.h index 76bf42965..07c85dd07 100644 --- a/Source/cmOrderDirectories.h +++ b/Source/cmOrderDirectories.h @@ -34,7 +34,7 @@ public: void AddLinkLibrary(std::string const& fullPath); void AddUserDirectories(std::vector const& extra); void AddLanguageDirectories(std::vector const& dirs); - void SetImplicitDirectories(std::set const& implicitDirs); + void SetImplicitDirectories(std::set const& implicitDirs); void SetLinkExtensionInfo(std::vector const& linkExtensions, std::string const& removeExtRegex); @@ -54,11 +54,11 @@ private: std::vector LanguageDirectories; cmsys::RegularExpression RemoveLibraryExtension; std::vector LinkExtensions; - std::set ImplicitDirectories; - std::set EmmittedConstraintSOName; - std::set EmmittedConstraintLibrary; + std::set ImplicitDirectories; + std::set EmmittedConstraintSOName; + std::set EmmittedConstraintLibrary; std::vector OriginalDirectories; - std::map DirectoryIndex; + std::map DirectoryIndex; std::vector DirectoryVisited; void CollectOriginalDirectories(); int AddOriginalDirectory(std::string const& dir); diff --git a/Source/cmPropertyDefinitionMap.cxx b/Source/cmPropertyDefinitionMap.cxx index 9ebbaa4d4..3875318f4 100644 --- a/Source/cmPropertyDefinitionMap.cxx +++ b/Source/cmPropertyDefinitionMap.cxx @@ -14,7 +14,7 @@ #include "cmDocumentationSection.h" void cmPropertyDefinitionMap -::DefineProperty(const cmStdString& name, cmProperty::ScopeType scope, +::DefineProperty(const std::string& name, cmProperty::ScopeType scope, const char *ShortDescription, const char *FullDescription, bool chain) @@ -29,7 +29,7 @@ void cmPropertyDefinitionMap } } -bool cmPropertyDefinitionMap::IsPropertyDefined(const cmStdString& name) +bool cmPropertyDefinitionMap::IsPropertyDefined(const std::string& name) { cmPropertyDefinitionMap::iterator it = this->find(name); if (it == this->end()) @@ -40,7 +40,7 @@ bool cmPropertyDefinitionMap::IsPropertyDefined(const cmStdString& name) return true; } -bool cmPropertyDefinitionMap::IsPropertyChained(const cmStdString& name) +bool cmPropertyDefinitionMap::IsPropertyChained(const std::string& name) { cmPropertyDefinitionMap::iterator it = this->find(name); if (it == this->end()) diff --git a/Source/cmPropertyDefinitionMap.h b/Source/cmPropertyDefinitionMap.h index 68c3ff3cd..00c7328c6 100644 --- a/Source/cmPropertyDefinitionMap.h +++ b/Source/cmPropertyDefinitionMap.h @@ -17,20 +17,20 @@ class cmDocumentationSection; class cmPropertyDefinitionMap : -public std::map +public std::map { public: // define the property - void DefineProperty(const cmStdString& name, cmProperty::ScopeType scope, + void DefineProperty(const std::string& name, cmProperty::ScopeType scope, const char *ShortDescription, const char *FullDescription, bool chain); // has a named property been defined - bool IsPropertyDefined(const cmStdString& name); + bool IsPropertyDefined(const std::string& name); // is a named property set to chain - bool IsPropertyChained(const cmStdString& name); + bool IsPropertyChained(const std::string& name); }; #endif diff --git a/Source/cmPropertyMap.h b/Source/cmPropertyMap.h index a13ac351f..fa3384831 100644 --- a/Source/cmPropertyMap.h +++ b/Source/cmPropertyMap.h @@ -16,7 +16,7 @@ class cmake; -class cmPropertyMap : public std::map +class cmPropertyMap : public std::map { public: cmProperty *GetOrCreateProperty(const std::string& name); diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index e075c548b..17b2424c7 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -697,7 +697,7 @@ void cmQtAutoGenerators::SetupAutoUicTarget(cmTarget const* target, { cmMakefile *makefile = target->GetMakefile(); - std::set skipped; + std::set skipped; std::vector skipVec; cmSystemTools::ExpandListArgument(this->SkipUic.c_str(), skipVec); @@ -1895,7 +1895,7 @@ bool cmQtAutoGenerators::GenerateMoc(const std::string& sourceFile, |cmsysTerminal_Color_ForegroundBold, msg.c_str(), true, this->ColorOutput); - std::vector command; + std::vector command; command.push_back(this->MocExecutable); for (std::list::const_iterator it = this->MocIncludes.begin(); it != this->MocIncludes.end(); @@ -1924,7 +1924,7 @@ bool cmQtAutoGenerators::GenerateMoc(const std::string& sourceFile, if (this->Verbose) { - for(std::vector::const_iterator cmdIt = command.begin(); + for(std::vector::const_iterator cmdIt = command.begin(); cmdIt != command.end(); ++cmdIt) { @@ -1971,7 +1971,7 @@ bool cmQtAutoGenerators::GenerateUi(const std::string& path, |cmsysTerminal_Color_ForegroundBold, msg.c_str(), true, this->ColorOutput); - std::vector command; + std::vector command; command.push_back(this->UicExecutable); std::vector opts = this->UicTargetOptions; @@ -1996,7 +1996,7 @@ bool cmQtAutoGenerators::GenerateUi(const std::string& path, if (this->Verbose) { - for(std::vector::const_iterator cmdIt = command.begin(); + for(std::vector::const_iterator cmdIt = command.begin(); cmdIt != command.end(); ++cmdIt) { @@ -2034,7 +2034,7 @@ bool cmQtAutoGenerators::GenerateQrc() { continue; } - std::vector command; + std::vector command; command.push_back(this->RccExecutable); std::string basename = cmsys::SystemTools:: @@ -2068,7 +2068,7 @@ bool cmQtAutoGenerators::GenerateQrc() if (this->Verbose) { - for(std::vector::const_iterator cmdIt = command.begin(); + for(std::vector::const_iterator cmdIt = command.begin(); cmdIt != command.end(); ++cmdIt) { diff --git a/Source/cmRST.cxx b/Source/cmRST.cxx index 11a991301..7ff12dde6 100644 --- a/Source/cmRST.cxx +++ b/Source/cmRST.cxx @@ -326,11 +326,11 @@ std::string cmRST::ReplaceSubstitutions(std::string const& line) std::string::size_type start = this->Substitution.start(2); std::string::size_type end = this->Substitution.end(2); std::string substitute = this->Substitution.match(3); - std::map::iterator + std::map::iterator replace = this->Replace.find(substitute); if(replace != this->Replace.end()) { - std::pair::iterator, bool> replaced = + std::pair::iterator, bool> replaced = this->Replaced.insert(substitute); if(replaced.second) { diff --git a/Source/cmRST.h b/Source/cmRST.h index 335600867..b9b236642 100644 --- a/Source/cmRST.h +++ b/Source/cmRST.h @@ -92,8 +92,8 @@ private: std::vector MarkupLines; std::string DocDir; - std::map Replace; - std::set Replaced; + std::map Replace; + std::set Replaced; std::string ReplaceName; }; diff --git a/Source/cmSetPropertyCommand.cxx b/Source/cmSetPropertyCommand.cxx index e561e36d3..84c7610ea 100644 --- a/Source/cmSetPropertyCommand.cxx +++ b/Source/cmSetPropertyCommand.cxx @@ -241,7 +241,7 @@ bool cmSetPropertyCommand::HandleDirectoryMode() //---------------------------------------------------------------------------- bool cmSetPropertyCommand::HandleTargetMode() { - for(std::set::const_iterator ni = this->Names.begin(); + for(std::set::const_iterator ni = this->Names.begin(); ni != this->Names.end(); ++ni) { if (this->Makefile->IsAlias(*ni)) @@ -297,7 +297,7 @@ bool cmSetPropertyCommand::HandleTarget(cmTarget* target) //---------------------------------------------------------------------------- bool cmSetPropertyCommand::HandleSourceMode() { - for(std::set::const_iterator ni = this->Names.begin(); + for(std::set::const_iterator ni = this->Names.begin(); ni != this->Names.end(); ++ni) { // Get the source file. @@ -345,8 +345,8 @@ bool cmSetPropertyCommand::HandleSource(cmSourceFile* sf) bool cmSetPropertyCommand::HandleTestMode() { // Look for tests with all names given. - std::set::iterator next; - for(std::set::iterator ni = this->Names.begin(); + std::set::iterator next; + for(std::set::iterator ni = this->Names.begin(); ni != this->Names.end(); ni = next) { next = ni; @@ -369,7 +369,7 @@ bool cmSetPropertyCommand::HandleTestMode() { cmOStringStream e; e << "given TEST names that do not exist:\n"; - for(std::set::const_iterator ni = this->Names.begin(); + for(std::set::const_iterator ni = this->Names.begin(); ni != this->Names.end(); ++ni) { e << " " << *ni << "\n"; @@ -440,7 +440,7 @@ bool cmSetPropertyCommand::HandleCacheMode() return false; } - for(std::set::const_iterator ni = this->Names.begin(); + for(std::set::const_iterator ni = this->Names.begin(); ni != this->Names.end(); ++ni) { // Get the source file. diff --git a/Source/cmSetPropertyCommand.h b/Source/cmSetPropertyCommand.h index 5470314ca..5757d219c 100644 --- a/Source/cmSetPropertyCommand.h +++ b/Source/cmSetPropertyCommand.h @@ -44,7 +44,7 @@ public: cmTypeMacro(cmSetPropertyCommand, cmCommand); private: - std::set Names; + std::set Names; std::string PropertyName; std::string PropertyValue; bool Remove; diff --git a/Source/cmSourceGroup.cxx b/Source/cmSourceGroup.cxx index 195feb5ff..8fed95e11 100644 --- a/Source/cmSourceGroup.cxx +++ b/Source/cmSourceGroup.cxx @@ -99,7 +99,7 @@ bool cmSourceGroup::MatchesRegex(const char* name) //---------------------------------------------------------------------------- bool cmSourceGroup::MatchesFiles(const char* name) { - std::set::const_iterator i = this->GroupFiles.find(name); + std::set::const_iterator i = this->GroupFiles.find(name); if(i != this->GroupFiles.end()) { return true; diff --git a/Source/cmSourceGroup.h b/Source/cmSourceGroup.h index 2d891d1d5..e8cf519d4 100644 --- a/Source/cmSourceGroup.h +++ b/Source/cmSourceGroup.h @@ -118,7 +118,7 @@ private: /** * Set of file names explicitly added to this group. */ - std::set GroupFiles; + std::set GroupFiles; /** * Vector of all source files that have been assigned to diff --git a/Source/cmStandardIncludes.h b/Source/cmStandardIncludes.h index 04e1bc840..ed8efcc68 100644 --- a/Source/cmStandardIncludes.h +++ b/Source/cmStandardIncludes.h @@ -241,7 +241,7 @@ inline bool operator==(std::string const& a, const char* b) // std::string is really basic_string<....lots of stuff....> // when combined with a map or set, the symbols can be > 2000 chars! #include -typedef cmsys::String cmStdString; +//typedef cmsys::String std::string; // Define cmOStringStream and cmIStringStream wrappers to hide // differences between std::stringstream and the old strstream. @@ -468,7 +468,7 @@ struct cmStrCmp { } private: - const cmStdString m_test; + const std::string m_test; }; #endif diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 2b17fba73..39b53bf5f 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -477,13 +477,6 @@ public: args.push_back(*arg); } } - void Store(std::vector& args) const - { - for(char** arg = this->ArgV; arg && *arg; ++arg) - { - args.push_back(*arg); - } - } }; //---------------------------------------------------------------------------- @@ -495,15 +488,6 @@ void cmSystemTools::ParseUnixCommandLine(const char* command, argv.Store(args); } -//---------------------------------------------------------------------------- -void cmSystemTools::ParseUnixCommandLine(const char* command, - std::vector& args) -{ - // Invoke the underlying parser. - cmSystemToolsArgV argv = cmsysSystem_Parse_CommandForUnix(command, 0); - argv.Store(args); -} - std::string cmSystemTools::EscapeWindowsShellArgument(const char* arg, int shell_flags) { @@ -523,9 +507,9 @@ std::string cmSystemTools::EscapeWindowsShellArgument(const char* arg, return result; } -std::vector cmSystemTools::ParseArguments(const char* command) +std::vector cmSystemTools::ParseArguments(const char* command) { - std::vector args; + std::vector args; std::string arg; bool win_path = false; @@ -606,22 +590,6 @@ std::vector cmSystemTools::ParseArguments(const char* command) } -bool cmSystemTools::RunSingleCommand(std::vectorconst& command, - std::string* output , - int* retVal , const char* dir , - OutputOption outputflag , - double timeout ) -{ - std::vector cmd; - for(std::vector::const_iterator i = command.begin(); - i != command.end(); ++i) - { - cmd.push_back(*i); - } - return cmSystemTools::RunSingleCommand(cmd, output, retVal, dir, - outputflag, timeout); -} - bool cmSystemTools::RunSingleCommand(std::vectorconst& command, std::string* output , int* retVal , const char* dir , @@ -781,7 +749,7 @@ bool cmSystemTools::RunSingleCommand( outputflag = OUTPUT_NONE; } - std::vector args = cmSystemTools::ParseArguments(command); + std::vector args = cmSystemTools::ParseArguments(command); if(args.size() < 1) { @@ -1114,8 +1082,8 @@ void cmSystemTools::ExpandListArgument(const std::string& arg, } } -bool cmSystemTools::SimpleGlob(const cmStdString& glob, - std::vector& files, +bool cmSystemTools::SimpleGlob(const std::string& glob, + std::vector& files, int type /* = 0 */) { files.clear(); @@ -1233,7 +1201,7 @@ cmSystemTools::FileFormat cmSystemTools::GetFileFormat(const char* cext) return cmSystemTools::UNKNOWN_FILE_FORMAT; } -bool cmSystemTools::Split(const char* s, std::vector& l) +bool cmSystemTools::Split(const char* s, std::vector& l) { std::vector temp; bool res = Superclass::Split(s, temp); @@ -1445,7 +1413,7 @@ bool cmSystemTools::IsPathToFramework(const char* path) } bool cmSystemTools::CreateTar(const char* outFileName, - const std::vector& files, + const std::vector& files, bool gzip, bool bzip2, bool verbose) { #if defined(CMAKE_BUILD_WITH_CMAKE) @@ -1465,7 +1433,7 @@ bool cmSystemTools::CreateTar(const char* outFileName, cmArchiveWrite::CompressNone)), cmArchiveWrite::TypeTAR); a.SetVerbose(verbose); - for(std::vector::const_iterator i = files.begin(); + for(std::vector::const_iterator i = files.begin(); i != files.end(); ++i) { std::string path = *i; @@ -2317,7 +2285,7 @@ bool cmSystemTools::GuessLibrarySOName(std::string const& fullPath, bool cmSystemTools::GuessLibraryInstallName(std::string const& fullPath, std::string& soname) { - std::vector cmds; + std::vector cmds; cmds.push_back("otool"); cmds.push_back("-D"); cmds.push_back(fullPath.c_str()); diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h index 4a212c266..27b4bceaf 100644 --- a/Source/cmSystemTools.h +++ b/Source/cmSystemTools.h @@ -172,8 +172,8 @@ public: * want to find. 0 means all files, -1 means directories, 1 means * files only. This method returns true if search was succesfull. */ - static bool SimpleGlob(const cmStdString& glob, - std::vector& files, + static bool SimpleGlob(const std::string& glob, + std::vector& files, int type = 0); ///! Copy a file. @@ -234,18 +234,13 @@ public: int* retVal = 0, const char* dir = 0, OutputOption outputflag = OUTPUT_MERGE, double timeout = 0.0); - static bool RunSingleCommand(std::vector const& command, - std::string* output = 0, - int* retVal = 0, const char* dir = 0, - OutputOption outputflag = OUTPUT_MERGE, - double timeout = 0.0); static std::string PrintSingleCommand(std::vector const&); /** * Parse arguments out of a single string command */ - static std::vector ParseArguments(const char* command); + static std::vector ParseArguments(const char* command); /** Parse arguments out of a windows command line string. */ static void ParseWindowsCommandLine(const char* command, @@ -254,8 +249,6 @@ public: /** Parse arguments out of a unix command line string. */ static void ParseUnixCommandLine(const char* command, std::vector& args); - static void ParseUnixCommandLine(const char* command, - std::vector& args); /** Compute an escaped version of the given argument for use in a windows shell. See kwsys/System.h.in for details. */ @@ -321,7 +314,7 @@ public: /** Split a string on its newlines into multiple lines. Returns false only if the last line stored had no newline. */ - static bool Split(const char* s, std::vector& l); + static bool Split(const char* s, std::vector& l); static void SetForceUnixPaths(bool v) { s_ForceUnixPaths = v; @@ -390,7 +383,7 @@ public: static bool ListTar(const char* outFileName, bool gzip, bool verbose); static bool CreateTar(const char* outFileName, - const std::vector& files, bool gzip, + const std::vector& files, bool gzip, bool bzip2, bool verbose); static bool ExtractTar(const char* inFileName, bool gzip, bool verbose); diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index c927a0b87..99f2c1f03 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -118,7 +118,7 @@ public: LinkInterfaceMapType LinkInterfaceMap; bool PolicyWarnedCMP0022; - typedef std::map OutputInfoMapType; + typedef std::map OutputInfoMapType; OutputInfoMapType OutputInfoMap; typedef std::map @@ -356,10 +356,10 @@ void cmTarget::SetMakefile(cmMakefile* mf) { this->InsertInclude(*it); } - const std::set parentSystemIncludes = + const std::set parentSystemIncludes = this->Makefile->GetSystemIncludeDirectories(); - for (std::set::const_iterator it + for (std::set::const_iterator it = parentSystemIncludes.begin(); it != parentSystemIncludes.end(); ++it) { @@ -428,7 +428,7 @@ void cmTarget::AddUtility(const std::string& u, cmMakefile *makefile) cmListFileBacktrace const* cmTarget::GetUtilityBacktrace( const std::string& u) const { - std::map::const_iterator i = + std::map::const_iterator i = this->UtilityBacktraces.find(u); if(i == this->UtilityBacktraces.end()) return 0; @@ -776,8 +776,8 @@ void cmTarget::GetDirectLinkLibraries(const char *config, &dagChecker), libs); - std::set seenProps = cge->GetSeenTargetProperties(); - for (std::set::const_iterator it = seenProps.begin(); + std::set seenProps = cge->GetSeenTargetProperties(); + for (std::set::const_iterator it = seenProps.begin(); it != seenProps.end(); ++it) { if (!this->GetProperty(it->c_str())) @@ -887,7 +887,7 @@ void cmTarget::GetTllSignatureTraces(cmOStringStream &s, = (sig == cmTarget::KeywordTLLSignature ? "keyword" : "plain"); s << "The uses of the " << sigString << " signature are here:\n"; - std::set emitted; + std::set emitted; for(std::vector::const_iterator it = sigs.begin(); it != sigs.end(); ++it) { @@ -981,9 +981,9 @@ void cmTarget::AddLinkLibrary(cmMakefile& mf, //---------------------------------------------------------------------------- void -cmTarget::AddSystemIncludeDirectories(const std::set &incs) +cmTarget::AddSystemIncludeDirectories(const std::set &incs) { - for(std::set::const_iterator li = incs.begin(); + for(std::set::const_iterator li = incs.begin(); li != incs.end(); ++li) { this->SystemIncludeDirectories.insert(*li); @@ -1574,7 +1574,7 @@ static void processIncludeDirectories(cmTarget const* tgt, { bool testIsOff = true; bool cacheIncludes = false; - std::vector entryIncludes = (*it)->CachedEntries; + std::vector& entryIncludes = (*it)->CachedEntries; if(!entryIncludes.empty()) { testIsOff = false; @@ -2806,7 +2806,7 @@ class cmTargetCollectLinkLanguages { public: cmTargetCollectLinkLanguages(cmTarget const* target, const char* config, - std::set& languages, + std::set& languages, cmTarget const* head): Config(config), Languages(languages), HeadTarget(head), Makefile(target->GetMakefile()), Target(target) @@ -2878,7 +2878,7 @@ public: } private: const char* Config; - std::set& Languages; + std::set& Languages; cmTarget const* HeadTarget; cmMakefile* Makefile; const cmTarget* Target; @@ -2917,7 +2917,7 @@ class cmTargetSelectLinker cmTarget const* Target; cmMakefile* Makefile; cmGlobalGenerator* GG; - std::set Preferred; + std::set Preferred; public: cmTargetSelectLinker(cmTarget const* target): Preference(0), Target(target) { @@ -2949,7 +2949,7 @@ public: e << "Target " << this->Target->GetName() << " contains multiple languages with the highest linker preference" << " (" << this->Preference << "):\n"; - for(std::set::const_iterator + for(std::set::const_iterator li = this->Preferred.begin(); li != this->Preferred.end(); ++li) { e << " " << *li << "\n"; @@ -2968,7 +2968,7 @@ void cmTarget::ComputeLinkClosure(const char* config, LinkClosure& lc, cmTarget const* head) const { // Get languages built in this target. - std::set languages; + std::set languages; LinkImplementation const* impl = this->GetLinkImplementation(config, head); for(std::vector::const_iterator li = impl->Languages.begin(); li != impl->Languages.end(); ++li) @@ -2985,7 +2985,7 @@ void cmTarget::ComputeLinkClosure(const char* config, LinkClosure& lc, } // Store the transitive closure of languages. - for(std::set::const_iterator li = languages.begin(); + for(std::set::const_iterator li = languages.begin(); li != languages.end(); ++li) { lc.Languages.push_back(*li); @@ -3013,7 +3013,7 @@ void cmTarget::ComputeLinkClosure(const char* config, LinkClosure& lc, } // Now consider languages that propagate from linked targets. - for(std::set::const_iterator sit = languages.begin(); + for(std::set::const_iterator sit = languages.begin(); sit != languages.end(); ++sit) { std::string propagates = "CMAKE_"+*sit+"_LINKER_PREFERENCE_PROPAGATES"; @@ -4822,7 +4822,7 @@ bool cmTarget::IsLinkInterfaceDependentNumberMaxProperty(const std::string &p, } //---------------------------------------------------------------------------- -void cmTarget::GetLanguages(std::set& languages) const +void cmTarget::GetLanguages(std::set& languages) const { for(std::vector::const_iterator i = this->SourceFiles.begin(); i != this->SourceFiles.end(); ++i) @@ -5662,7 +5662,7 @@ void cmTargetInternals::ComputeLinkInterface(cmTarget const* thisTarget, { // Shared libraries may have runtime implementation dependencies // on other shared libraries that are not in the interface. - std::set emitted; + std::set emitted; for(std::vector::const_iterator li = iface.Libraries.begin(); li != iface.Libraries.end(); ++li) { @@ -5891,7 +5891,7 @@ void cmTarget::ComputeLinkImplementationLanguages(LinkImplementation& impl) const { // This target needs runtime libraries for its source languages. - std::set languages; + std::set languages; // Get languages used in our source files. this->GetLanguages(languages); // Get languages used in object library sources. @@ -5908,7 +5908,7 @@ cmTarget::ComputeLinkImplementationLanguages(LinkImplementation& impl) const } } // Copy the set of langauges to the link implementation. - for(std::set::iterator li = languages.begin(); + for(std::set::iterator li = languages.begin(); li != languages.end(); ++li) { impl.Languages.push_back(*li); @@ -6017,8 +6017,8 @@ const char * getLinkInterfaceDependentProperty(cmTarget const* tgt, template void checkPropertyConsistency(cmTarget const* depender, cmTarget const* dependee, - const cmStdString& propName, - std::set &emitted, + const std::string& propName, + std::set &emitted, const char *config, CompatibleType t, PropertyType *) @@ -6062,10 +6062,10 @@ void checkPropertyConsistency(cmTarget const* depender, } } -static cmStdString intersect(const std::set &s1, - const std::set &s2) +static std::string intersect(const std::set &s1, + const std::set &s2) { - std::set intersect; + std::set intersect; std::set_intersection(s1.begin(),s1.end(), s2.begin(),s2.end(), std::inserter(intersect,intersect.begin())); @@ -6075,11 +6075,11 @@ static cmStdString intersect(const std::set &s1, } return ""; } -static cmStdString intersect(const std::set &s1, - const std::set &s2, - const std::set &s3) +static std::string intersect(const std::set &s1, + const std::set &s2, + const std::set &s3) { - cmStdString result; + std::string result; result = intersect(s1, s2); if (!result.empty()) return result; @@ -6088,12 +6088,12 @@ static cmStdString intersect(const std::set &s1, return result; return intersect(s2, s3); } -static cmStdString intersect(const std::set &s1, - const std::set &s2, - const std::set &s3, - const std::set &s4) +static std::string intersect(const std::set &s1, + const std::set &s2, + const std::set &s3, + const std::set &s4) { - cmStdString result; + std::string result; result = intersect(s1, s2); if (!result.empty()) return result; @@ -6112,10 +6112,10 @@ void cmTarget::CheckPropertyCompatibility(cmComputeLinkInformation *info, { const cmComputeLinkInformation::ItemVector &deps = info->GetItems(); - std::set emittedBools; - std::set emittedStrings; - std::set emittedMinNumbers; - std::set emittedMaxNumbers; + std::set emittedBools; + std::set emittedStrings; + std::set emittedMinNumbers; + std::set emittedMaxNumbers; for(cmComputeLinkInformation::ItemVector::const_iterator li = deps.begin(); @@ -6167,7 +6167,7 @@ void cmTarget::CheckPropertyCompatibility(cmComputeLinkInformation *info, if (!prop.empty()) { std::set props; - std::set::const_iterator i = emittedBools.find(prop); + std::set::const_iterator i = emittedBools.find(prop); if (i != emittedBools.end()) { props.insert("COMPATIBLE_INTERFACE_BOOL"); diff --git a/Source/cmTarget.h b/Source/cmTarget.h index f73b271c2..ec74e0504 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -148,7 +148,7 @@ public: enum LinkLibraryType {GENERAL, DEBUG, OPTIMIZED}; //* how we identify a library, by name and type - typedef std::pair LibraryID; + typedef std::pair LibraryID; typedef std::vector LinkLibraryVectorType; const LinkLibraryVectorType &GetLinkLibraries() const { @@ -216,7 +216,7 @@ public: */ void AddUtility(const std::string& u, cmMakefile *makefile = 0); ///! Get the utilities used by this target - std::setconst& GetUtilities() const { return this->Utilities; } + std::setconst& GetUtilities() const { return this->Utilities; } cmListFileBacktrace const* GetUtilityBacktrace(const std::string& u) const; /** Finalize the target at the end of the Configure step. */ @@ -455,7 +455,7 @@ public: // when source file properties are changed and we do not have enough // information to forward these property changes to the targets // until we have per-target object file properties. - void GetLanguages(std::set& languages) const; + void GetLanguages(std::set& languages) const; /** Return whether this target is an executable with symbol exports enabled. */ @@ -552,9 +552,9 @@ public: std::string GetDebugGeneratorExpressions(const std::string &value, cmTarget::LinkLibraryType llt) const; - void AddSystemIncludeDirectories(const std::set &incs); + void AddSystemIncludeDirectories(const std::set &incs); void AddSystemIncludeDirectories(const std::vector &incs); - std::set const & GetSystemIncludeDirectories() const + std::set const & GetSystemIncludeDirectories() const { return this->SystemIncludeDirectories; } bool LinkLanguagePropagatesToDependents() const @@ -570,7 +570,7 @@ private: // The set of include directories that are marked as system include // directories. - std::set SystemIncludeDirectories; + std::set SystemIncludeDirectories; std::vector > TLLCommands; @@ -675,13 +675,13 @@ private: LinkLibraryVectorType PrevLinkedLibraries; bool LinkLibrariesAnalyzed; std::vector LinkDirectories; - std::set LinkDirectoriesEmmitted; + std::set LinkDirectoriesEmmitted; bool HaveInstallRule; std::string InstallPath; std::string RuntimeInstallPath; mutable std::string ExportMacro; - std::set Utilities; - std::map UtilityBacktraces; + std::set Utilities; + std::map UtilityBacktraces; bool RecordDependencies; mutable cmPropertyMap Properties; LinkLibraryVectorType OriginalLinkLibraries; @@ -762,9 +762,9 @@ private: const char* version) const; }; -typedef std::map cmTargets; +typedef std::map cmTargets; -class cmTargetSet: public std::set {}; -class cmTargetManifest: public std::map {}; +class cmTargetSet: public std::set {}; +class cmTargetManifest: public std::map {}; #endif diff --git a/Source/cmTest.h b/Source/cmTest.h index a5795c3dd..b3785f636 100644 --- a/Source/cmTest.h +++ b/Source/cmTest.h @@ -65,7 +65,7 @@ public: private: cmPropertyMap Properties; - cmStdString Name; + std::string Name; std::vector Command; bool OldStyle; diff --git a/Source/cmVariableWatch.h b/Source/cmVariableWatch.h index 790c75acc..c86fad03c 100644 --- a/Source/cmVariableWatch.h +++ b/Source/cmVariableWatch.h @@ -81,7 +81,7 @@ protected: }; typedef std::vector< Pair* > VectorOfPairs; - typedef std::map StringToVectorOfPairs; + typedef std::map StringToVectorOfPairs; StringToVectorOfPairs WatchMap; }; diff --git a/Source/cmVisualStudio10TargetGenerator.h b/Source/cmVisualStudio10TargetGenerator.h index d1f3d1929..8d6925430 100644 --- a/Source/cmVisualStudio10TargetGenerator.h +++ b/Source/cmVisualStudio10TargetGenerator.h @@ -98,7 +98,7 @@ private: private: typedef cmVisualStudioGeneratorOptions Options; - typedef std::map OptionsMap; + typedef std::map OptionsMap; OptionsMap ClOptions; OptionsMap LinkOptions; std::string PathToVcxproj; @@ -113,7 +113,7 @@ private: cmLocalVisualStudio7Generator* LocalGenerator; std::set SourcesVisited; - typedef std::map ToolSourceMap; + typedef std::map ToolSourceMap; ToolSourceMap Tools; }; diff --git a/Source/cmVisualStudioGeneratorOptions.cxx b/Source/cmVisualStudioGeneratorOptions.cxx index f48c59345..81adb56c6 100644 --- a/Source/cmVisualStudioGeneratorOptions.cxx +++ b/Source/cmVisualStudioGeneratorOptions.cxx @@ -300,7 +300,7 @@ cmVisualStudioGeneratorOptions { if(this->Version >= cmLocalVisualStudioGenerator::VS10) { - for(std::map::iterator m = this->FlagMap.begin(); + for(std::map::iterator m = this->FlagMap.begin(); m != this->FlagMap.end(); ++m) { fout << indent; @@ -326,7 +326,7 @@ cmVisualStudioGeneratorOptions } else { - for(std::map::iterator m = this->FlagMap.begin(); + for(std::map::iterator m = this->FlagMap.begin(); m != this->FlagMap.end(); ++m) { fout << indent << m->first << "=\"" << m->second << "\"\n"; diff --git a/Source/cmXCodeObject.cxx b/Source/cmXCodeObject.cxx index 3b9035fea..3302a8de4 100644 --- a/Source/cmXCodeObject.cxx +++ b/Source/cmXCodeObject.cxx @@ -108,7 +108,7 @@ void cmXCodeObject::Print(std::ostream& out) { out << separator; } - std::map::iterator i; + std::map::iterator i; cmXCodeObject::Indent(3*indentFactor, out); out << "isa = " << PBXTypeNames[this->IsA] << ";" << separator; for(i = this->ObjectAttributes.begin(); @@ -138,7 +138,7 @@ void cmXCodeObject::Print(std::ostream& out) } else if(object->TypeValue == ATTRIBUTE_GROUP) { - std::map::iterator j; + std::map::iterator j; out << i->first << " = {" << separator; for(j = object->ObjectAttributes.begin(); j != object->ObjectAttributes.end(); ++j) @@ -236,7 +236,7 @@ void cmXCodeObject::CopyAttributes(cmXCodeObject* copy) } //---------------------------------------------------------------------------- -void cmXCodeObject::PrintString(std::ostream& os,cmStdString String) +void cmXCodeObject::PrintString(std::ostream& os,std::string String) { // The string needs to be quoted if it contains any characters // considered special by the Xcode project file parser. diff --git a/Source/cmXCodeObject.h b/Source/cmXCodeObject.h index b4623a053..8eaf2aab4 100644 --- a/Source/cmXCodeObject.h +++ b/Source/cmXCodeObject.h @@ -30,7 +30,7 @@ public: PBXCopyFilesBuildPhase, None }; - class StringVec: public std::vector {}; + class StringVec: public std::vector {}; static const char* PBXTypeNames[]; virtual ~cmXCodeObject(); cmXCodeObject(PBXType ptype, Type type); @@ -131,7 +131,7 @@ public: } this->DependLibraries[configName].push_back(l); } - std::map const& GetDependLibraries() + std::map const& GetDependLibraries() { return this->DependLibraries; } @@ -144,27 +144,27 @@ public: } this->DependTargets[configName].push_back(tName); } - std::map const& GetDependTargets() + std::map const& GetDependTargets() { return this->DependTargets; } std::vector const& GetObjectList() { return this->List;} void SetComment(const char* c) { this->Comment = c;} - static void PrintString(std::ostream& os,cmStdString String); + static void PrintString(std::ostream& os,std::string String); protected: void PrintString(std::ostream& os) const; cmTarget* Target; Type TypeValue; - cmStdString Id; + std::string Id; PBXType IsA; int Version; - cmStdString Comment; - cmStdString String; + std::string Comment; + std::string String; cmXCodeObject* Object; std::vector List; - std::map DependLibraries; - std::map DependTargets; - std::map ObjectAttributes; + std::map DependLibraries; + std::map DependTargets; + std::map ObjectAttributes; }; #endif diff --git a/Source/cmake.cxx b/Source/cmake.cxx index ad1d0fafb..bdba9c21c 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -2701,7 +2701,7 @@ void cmake::RunCheckForUnusedVariables() bool haveUnused = false; cmOStringStream msg; msg << "Manually-specified variables were not used by the project:"; - for(std::map::const_iterator + for(std::map::const_iterator it = this->UsedCliVariables.begin(); it != this->UsedCliVariables.end(); ++it) { diff --git a/Source/cmake.h b/Source/cmake.h index 2d78e8f00..1b8152029 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -91,7 +91,7 @@ class cmake */ FIND_PACKAGE_MODE }; - typedef std::map RegisteredCommandsMap; + typedef std::map RegisteredCommandsMap; /// Default constructor cmake(); @@ -364,14 +364,14 @@ protected: void InitializeProperties(); int HandleDeleteCacheVariables(const std::string& var); cmPropertyMap Properties; - std::set > AccessedProperties; + std::set > AccessedProperties; std::map PropertyDefinitions; typedef cmExternalMakefileProjectGenerator* (*CreateExtraGeneratorFunctionType)(); - typedef std::map RegisteredExtraGeneratorsMap; typedef std::vector RegisteredGeneratorsVector; RegisteredCommandsMap Commands; @@ -432,7 +432,7 @@ private: bool WarnUnused; bool WarnUnusedCli; bool CheckSystemVars; - std::map UsedCliVariables; + std::map UsedCliVariables; std::string CMakeEditCommand; std::string CXXEnvironment; std::string CCEnvironment; diff --git a/Source/cmcldeps.cxx b/Source/cmcldeps.cxx index faa5fa7c6..55fc6338a 100644 --- a/Source/cmcldeps.cxx +++ b/Source/cmcldeps.cxx @@ -198,7 +198,7 @@ static int process( const std::string& srcfilename, std::vector args; cmSystemTools::ParseWindowsCommandLine(cmd.c_str(), args); // convert to correct vector type for RunSingleCommand - std::vector command; + std::vector command; for(std::vector::iterator i = args.begin(); i != args.end(); ++i) { diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index 4ac198622..603b6d0c0 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -677,7 +677,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) { std::string flags = args[2]; std::string outFile = args[3]; - std::vector files; + std::vector files; for (std::string::size_type cc = 4; cc < args.size(); cc ++) { files.push_back(args[cc]); @@ -1143,7 +1143,7 @@ int cmcmd::VisualStudioLink(std::vector& args, int type) } int cmcmd::ParseVisualStudioLinkCommand(std::vector& args, - std::vector& command, + std::vector& command, std::string& targetName) { std::vector::iterator i = args.begin(); @@ -1171,14 +1171,14 @@ int cmcmd::ParseVisualStudioLinkCommand(std::vector& args, } bool cmcmd::RunCommand(const char* comment, - std::vector& command, + std::vector& command, bool verbose, int* retCodeOut) { if(verbose) { std::cout << comment << ":\n"; - for(std::vector::iterator i = command.begin(); + for(std::vector::iterator i = command.begin(); i != command.end(); ++i) { std::cout << i->c_str() << " "; @@ -1239,16 +1239,16 @@ int cmcmd::VisualStudioLinkIncremental(std::vector& args, // 7. Finally, the Linker does another incremental link, but since the // only thing that has changed is the *.res file that contains the // manifest it is a short link. - std::vector linkCommand; + std::vector linkCommand; std::string targetName; if(cmcmd::ParseVisualStudioLinkCommand(args, linkCommand, targetName) == -1) { return -1; } std::string manifestArg = "/MANIFESTFILE:"; - std::vector rcCommand; + std::vector rcCommand; rcCommand.push_back(cmSystemTools::FindProgram("rc.exe")); - std::vector mtCommand; + std::vector mtCommand; mtCommand.push_back(cmSystemTools::FindProgram("mt.exe")); std::string tempManifest; tempManifest = targetName; @@ -1349,7 +1349,7 @@ int cmcmd::VisualStudioLinkNonIncremental(std::vector& args, bool hasManifest, bool verbose) { - std::vector linkCommand; + std::vector linkCommand; std::string targetName; if(cmcmd::ParseVisualStudioLinkCommand(args, linkCommand, targetName) == -1) { @@ -1368,7 +1368,7 @@ int cmcmd::VisualStudioLinkNonIncremental(std::vector& args, { return 0; } - std::vector mtCommand; + std::vector mtCommand; mtCommand.push_back(cmSystemTools::FindProgram("mt.exe")); mtCommand.push_back("/nologo"); mtCommand.push_back("/manifest"); diff --git a/Source/cmcmd.h b/Source/cmcmd.h index 4517ebf64..2bfbae7cc 100644 --- a/Source/cmcmd.h +++ b/Source/cmcmd.h @@ -43,10 +43,10 @@ protected: bool hasManifest, bool verbose); static int ParseVisualStudioLinkCommand(std::vector& args, - std::vector& command, + std::vector& command, std::string& targetName); static bool RunCommand(const char* comment, - std::vector& command, + std::vector& command, bool verbose, int* retCodeOut = 0); }; diff --git a/Tests/CMakeLib/run_compile_commands.cxx b/Tests/CMakeLib/run_compile_commands.cxx index dc1ce24f7..279bcd587 100644 --- a/Tests/CMakeLib/run_compile_commands.cxx +++ b/Tests/CMakeLib/run_compile_commands.cxx @@ -2,14 +2,14 @@ class CompileCommandParser { public: - class CommandType: public std::map + class CommandType: public std::map { public: - cmStdString const& at(cmStdString const& k) const + std::string const& at(std::string const& k) const { const_iterator i = this->find(k); if(i != this->end()) { return i->second; } - static cmStdString emptyString; + static std::string emptyString; return emptyString; } }; @@ -127,7 +127,7 @@ int main () it = parser.GetTranslationUnits().begin(), end = parser.GetTranslationUnits().end(); it != end; ++it) { - std::vector command; + std::vector command; cmSystemTools::ParseUnixCommandLine(it->at("command").c_str(), command); if (!cmSystemTools::RunSingleCommand( command, 0, 0, it->at("directory").c_str()))