summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestSVN.h
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2017-05-04 14:12:45 (GMT)
committerBrad King <brad.king@kitware.com>2017-05-04 15:17:49 (GMT)
commit3e027d9def0f2d9f542cb71eda12e9527c418c9e (patch)
tree5e1baea6d8eb68854e5ff0f13729b23a2fffdff4 /Source/CTest/cmCTestSVN.h
parentec526768ac5f1e00a39075cd07fd93cffa1f1818 (diff)
downloadCMake-3e027d9def0f2d9f542cb71eda12e9527c418c9e.zip
CMake-3e027d9def0f2d9f542cb71eda12e9527c418c9e.tar.gz
CMake-3e027d9def0f2d9f542cb71eda12e9527c418c9e.tar.bz2
c++: prefer vectors over lists
None of these usages of `std::list` were inserting or removing elements in the middle of the structure, so there were no benefits to using it. Other uses were related to C pointers being stable in a list of strings whereas in a vector of strings, small pointer optimizations could be moved and become invalid after a modification to the hosting vector. None of these uses modified the vector after handing out a C string to an external store.
Diffstat (limited to 'Source/CTest/cmCTestSVN.h')
-rw-r--r--Source/CTest/cmCTestSVN.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/Source/CTest/cmCTestSVN.h b/Source/CTest/cmCTestSVN.h
index d90d387..46b0778 100644
--- a/Source/CTest/cmCTestSVN.h
+++ b/Source/CTest/cmCTestSVN.h
@@ -8,7 +8,6 @@
#include "cmCTestGlobalVC.h"
#include <iosfwd>
-#include <list>
#include <string>
#include <vector>
@@ -71,7 +70,7 @@ private:
friend struct Revision;
// Info of all the repositories (root, externals and nested ones).
- std::list<SVNInfo> Repositories;
+ std::vector<SVNInfo> Repositories;
// Pointer to the infos of the root repository.
SVNInfo* RootInfo;