diff options
author | Alex Neundorf <neundorf@kde.org> | 2013-02-10 16:49:42 (GMT) |
---|---|---|
committer | Alex Neundorf <neundorf@kde.org> | 2013-02-10 16:49:42 (GMT) |
commit | 10511aa0849936df3724556f1f42fc3e4cf43f9f (patch) | |
tree | e6d67efa25e44078a72bcf37405f2d82a5c781d0 /Source/cmQtAutomoc.cxx | |
parent | 12806779be9e8f18c6eb1bbf7fb69640af1fcf1d (diff) | |
download | CMake-10511aa0849936df3724556f1f42fc3e4cf43f9f.zip CMake-10511aa0849936df3724556f1f42fc3e4cf43f9f.tar.gz CMake-10511aa0849936df3724556f1f42fc3e4cf43f9f.tar.bz2 |
automoc: use a std::vector<> instead a std::list
Alex
Diffstat (limited to 'Source/cmQtAutomoc.cxx')
-rw-r--r-- | Source/cmQtAutomoc.cxx | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/Source/cmQtAutomoc.cxx b/Source/cmQtAutomoc.cxx index cc42175..8a2d308 100644 --- a/Source/cmQtAutomoc.cxx +++ b/Source/cmQtAutomoc.cxx @@ -44,10 +44,10 @@ static bool containsQ_OBJECT(const std::string& text) static std::string findMatchingHeader(const std::string& absPath, const std::string& mocSubDir, const std::string& basename, - const std::list<std::string>& headerExtensions) + const std::vector<std::string>& headerExtensions) { std::string header; - for(std::list<std::string>::const_iterator ext = headerExtensions.begin(); + for(std::vector<std::string>::const_iterator ext = headerExtensions.begin(); ext != headerExtensions.end(); ++ext) { @@ -528,7 +528,7 @@ bool cmQtAutomoc::RunAutomoc() std::vector<std::string> sourceFiles; cmSystemTools::ExpandListArgument(this->Sources, sourceFiles); - std::list<std::string> headerExtensions; + std::vector<std::string> headerExtensions; headerExtensions.push_back(".h"); headerExtensions.push_back(".hpp"); headerExtensions.push_back(".hxx"); @@ -643,7 +643,7 @@ bool cmQtAutomoc::RunAutomoc() void cmQtAutomoc::ParseCppFile(const std::string& absFilename, - const std::list<std::string>& headerExtensions, + const std::vector<std::string>& headerExtensions, std::map<std::string, std::string>& includedMocs) { cmsys::RegularExpression mocIncludeRegExp( @@ -821,7 +821,7 @@ void cmQtAutomoc::ParseCppFile(const std::string& absFilename, void cmQtAutomoc::StrictParseCppFile(const std::string& absFilename, - const std::list<std::string>& headerExtensions, + const std::vector<std::string>& headerExtensions, std::map<std::string, std::string>& includedMocs) { cmsys::RegularExpression mocIncludeRegExp( @@ -932,8 +932,8 @@ void cmQtAutomoc::StrictParseCppFile(const std::string& absFilename, void cmQtAutomoc::SearchHeadersForCppFile(const std::string& absFilename, - const std::list<std::string>& headerExtensions, - std::set<std::string>& absHeaders) + const std::vector<std::string>& headerExtensions, + std::set<std::string>& absHeaders) { // search for header files and private header files we may need to moc: const std::string basename = @@ -941,7 +941,7 @@ void cmQtAutomoc::SearchHeadersForCppFile(const std::string& absFilename, const std::string absPath = cmsys::SystemTools::GetFilenamePath( cmsys::SystemTools::GetRealPath(absFilename.c_str())) + '/'; - for(std::list<std::string>::const_iterator ext = headerExtensions.begin(); + for(std::vector<std::string>::const_iterator ext = headerExtensions.begin(); ext != headerExtensions.end(); ++ext) { @@ -952,7 +952,7 @@ void cmQtAutomoc::SearchHeadersForCppFile(const std::string& absFilename, break; } } - for(std::list<std::string>::const_iterator ext = headerExtensions.begin(); + for(std::vector<std::string>::const_iterator ext = headerExtensions.begin(); ext != headerExtensions.end(); ++ext) { @@ -1077,7 +1077,8 @@ bool cmQtAutomoc::GenerateMoc(const std::string& sourceFile, } -std::string cmQtAutomoc::Join(const std::list<std::string>& lst,char separator) +std::string cmQtAutomoc::Join(const std::vector<std::string>& lst, + char separator) { if (lst.empty()) { @@ -1085,7 +1086,7 @@ std::string cmQtAutomoc::Join(const std::list<std::string>& lst,char separator) } std::string result; - for (std::list<std::string>::const_iterator it = lst.begin(); + for (std::vector<std::string>::const_iterator it = lst.begin(); it != lst.end(); ++it) { |