Bladeren bron

cmSourceFileLocation: Return a string reference

Ben Boeckel 11 jaren geleden
bovenliggende
commit
14e7a8ae1c
1 gewijzigde bestanden met toevoegingen van 1 en 1 verwijderingen
  1. 1 1
      Source/cmSourceFileLocation.h

+ 1 - 1
Source/cmSourceFileLocation.h

@@ -71,7 +71,7 @@ public:
    * Otherwise it will be a relative path (possibly empty) that is
    * Otherwise it will be a relative path (possibly empty) that is
    * either with respect to the source or build tree.
    * either with respect to the source or build tree.
    */
    */
-  const char* GetDirectory() const { return this->Directory.c_str(); }
+  const std::string& GetDirectory() const { return this->Directory; }
 
 
   /**
   /**
    * Get the file name as best is currently known.  If
    * Get the file name as best is currently known.  If