Browse Source

cmLocalUnixMakefileGenerator3: use faster `rfind` overload

Ben Boeckel 5 tháng trước cách đây
mục cha
commit
4abd800498

+ 1 - 1
Source/cmLocalUnixMakefileGenerator3.cxx

@@ -249,7 +249,7 @@ void cmLocalUnixMakefileGenerator3::GetIndividualFileTargets(
   for (auto const& localObjectFile : localObjectFiles) {
   for (auto const& localObjectFile : localObjectFiles) {
     targets.push_back(localObjectFile.first);
     targets.push_back(localObjectFile.first);
 
 
-    std::string::size_type dot_pos = localObjectFile.first.rfind(".");
+    std::string::size_type dot_pos = localObjectFile.first.rfind('.');
     std::string base = localObjectFile.first.substr(0, dot_pos);
     std::string base = localObjectFile.first.substr(0, dot_pos);
     if (localObjectFile.second.HasPreprocessRule) {
     if (localObjectFile.second.HasPreprocessRule) {
       targets.push_back(base + ".i");
       targets.push_back(base + ".i");