On Wed, Jul 09, 2014 at 11:09:01 -0400, Brad King wrote:
> > +      std::string targetNameBase = targetName.substr(0, 
> > targetName.find_first_of("/"));

Not that this is performance-sensitive region, but in the pursuit
removing bad patterns to avoid copy/paste issues in the future:

    std::string targetNameBase = targetName.resize(targetName.find('/'));

is better, though the resize might not be doable since there's a check
for npos that is necessary if the targetName doesn't have a slash in it.
The find_first_of(one_char_string) should definitely be find(one_char)
or find_first_of(one_char).

Of course, assuming this line survives to the final patch.

Thanks,

--Ben
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to