瀏覽代碼

cmGetDirectoryPropertyCommand: Move variable to the point of use.

Stephen Kelly 10 年之前
父節點
當前提交
fe603c7dfb
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      Source/cmGetDirectoryPropertyCommand.cxx

+ 1 - 2
Source/cmGetDirectoryPropertyCommand.cxx

@@ -26,7 +26,6 @@ bool cmGetDirectoryPropertyCommand
   std::vector<std::string>::const_iterator i = args.begin();
   std::string variable = *i;
   ++i;
-  std::string output = "";
 
   // get the directory argument if there is one
   cmMakefile *dir = this->Makefile;
@@ -79,7 +78,7 @@ bool cmGetDirectoryPropertyCommand
                      "providing the name of the variable to get.");
       return false;
       }
-    output = dir->GetSafeDefinition(*i);
+    std::string output = dir->GetSafeDefinition(*i);
     this->Makefile->AddDefinition(variable, output.c_str());
     return true;
     }