From 5fc53f1edb2d003595ef224b31a805c3af0dc0e6 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sat, 24 Jan 2015 18:12:48 +0100 Subject: cmLocalGenerator: Replace loop with find_first_not_of --- Source/cmLocalGenerator.cxx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 7ca7684..9109db4 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -3204,11 +3204,7 @@ cmLocalGenerator std::string ssin = sin; // Avoid full paths by removing leading slashes. - std::string::size_type pos = 0; - for(;pos < ssin.size() && ssin[pos] == '/'; ++pos) - { - } - ssin = ssin.substr(pos); + ssin.erase(0, ssin.find_first_not_of("/")); // Avoid full paths by removing colons. cmSystemTools::ReplaceString(ssin, ":", "_"); -- cgit v0.12