[Cmake-commits] CMake branch, next, updated. v2.8.12-4442-gb82aacb
Brad King
brad.king at kitware.com
Thu Oct 24 08:17:01 EDT 2013
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via b82aacbb1a5cd33410572b5578b7a3df7d913b80 (commit)
via b6fbd681438bdf3c0f1981009d25af5790445fd3 (commit)
from 3f2d3247b39f09db978ba06944dd20ac63cfeb3a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b82aacbb1a5cd33410572b5578b7a3df7d913b80
commit b82aacbb1a5cd33410572b5578b7a3df7d913b80
Merge: 3f2d324 b6fbd68
Author: Brad King <brad.king at kitware.com>
AuthorDate: Thu Oct 24 08:16:59 2013 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Oct 24 08:16:59 2013 -0400
Merge topic 'ctest-p4' into next
b6fbd68 cmCTestP4: Fix use of size_t
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b6fbd681438bdf3c0f1981009d25af5790445fd3
commit b6fbd681438bdf3c0f1981009d25af5790445fd3
Author: Brad King <brad.king at kitware.com>
AuthorDate: Thu Oct 24 08:14:16 2013 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Thu Oct 24 08:14:56 2013 -0400
cmCTestP4: Fix use of size_t
Use plain size_t, not std::size_t, for portability to older compilers
like VS 6. Use iterators and reverse iterators instead of integer
indices to walk through std::vector<>s to avoid using size_t => int
conversion.
diff --git a/Source/CTest/cmCTestP4.cxx b/Source/CTest/cmCTestP4.cxx
index 32e8486..a504157 100644
--- a/Source/CTest/cmCTestP4.cxx
+++ b/Source/CTest/cmCTestP4.cxx
@@ -148,7 +148,7 @@ private:
// See if we need to remove the //depot prefix
if(Path.length() > 2 && Path[0] == '/' && Path[1] == '/')
{
- std::size_t found = Path.find('/', 2);
+ size_t found = Path.find('/', 2);
if(found != std::string::npos)
{
Path = Path.substr(found + 1);
@@ -303,7 +303,7 @@ private:
std::string Path = this->RegexDiff.match(1);
if(Path.length() > 2 && Path[0] == '/' && Path[1] == '/')
{
- std::size_t found = Path.find('/', 2);
+ size_t found = Path.find('/', 2);
if(found != std::string::npos)
{
Path = Path.substr(found + 1);
@@ -367,11 +367,10 @@ void cmCTestP4::SetP4Options(std::vector<char const*> &CommandOptions)
}
CommandOptions.clear();
- std::vector<std::string>::size_type i;
-
- for(i=0; i<P4Options.size(); i++)
+ for(std::vector<std::string>::iterator i = P4Options.begin();
+ i != P4Options.end(); ++i)
{
- CommandOptions.push_back(P4Options[i].c_str());
+ CommandOptions.push_back(i->c_str());
}
}
@@ -466,12 +465,13 @@ void cmCTestP4::LoadRevisions()
//p4 describe -s ... at 1111111,2222222
std::vector<char const*> p4_describe;
- for(int i=ChangeLists.size()-1; i >= 0; i--)
+ for(std::vector<std::string>::reverse_iterator i = ChangeLists.rbegin();
+ i != ChangeLists.rend(); ++i)
{
SetP4Options(p4_describe);
p4_describe.push_back("describe");
p4_describe.push_back("-s");
- p4_describe.push_back(ChangeLists[i].c_str());
+ p4_describe.push_back(i->c_str());
p4_describe.push_back(0);
DescribeParser outDescribe(this, "describe-out> ");
-----------------------------------------------------------------------
Summary of changes:
Source/CTest/cmCTestP4.cxx | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list