diff options
author | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2019-01-19 01:20:00 (GMT) |
---|---|---|
committer | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2019-01-19 01:30:13 (GMT) |
commit | 2c50a725763eb2201f356852eab98dfdf9c27591 (patch) | |
tree | 4fcd6733fd674c3d03ee700f706fb4af2efae1b7 /Source/cmDepends.h | |
parent | a61c061b6143cb6d8920b1b5796a867c0f104556 (diff) | |
download | CMake-2c50a725763eb2201f356852eab98dfdf9c27591.zip CMake-2c50a725763eb2201f356852eab98dfdf9c27591.tar.gz CMake-2c50a725763eb2201f356852eab98dfdf9c27591.tar.bz2 |
cmDepends: all members accept std::string arguments
Most `const char*` arguments converted to `const std::string&`
in `cmDepends` and derived classes.
In addition performed minor code cleanup.
Diffstat (limited to 'Source/cmDepends.h')
-rw-r--r-- | Source/cmDepends.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/Source/cmDepends.h b/Source/cmDepends.h index 705d215..b0b5bb5 100644 --- a/Source/cmDepends.h +++ b/Source/cmDepends.h @@ -29,7 +29,7 @@ class cmDepends public: /** Instances need to know the build directory name and the relative path from the build directory to the target file. */ - cmDepends(cmLocalGenerator* lg = nullptr, const char* targetDir = ""); + cmDepends(cmLocalGenerator* lg = nullptr, const std::string& targetDir = ""); /** Set the local generator for the directory in which we are scanning dependencies. This is not a full local generator; it @@ -41,7 +41,10 @@ public: void SetLanguage(const std::string& lang) { this->Language = lang; } /** Set the target build directory. */ - void SetTargetDirectory(const char* dir) { this->TargetDirectory = dir; } + void SetTargetDirectory(const std::string& dir) + { + this->TargetDirectory = dir; + } /** should this be verbose in its output */ void SetVerbose(bool verb) { this->Verbose = verb; } @@ -61,11 +64,11 @@ public: they must be generated Clear has already been called to wipe out the old dependencies. Dependencies which are still valid will be stored in validDeps. */ - bool Check(const char* makeFile, const char* internalFile, + bool Check(const std::string& makeFile, const std::string& internalFile, std::map<std::string, DependencyVector>& validDeps); /** Clear dependencies for the target file so they will be regenerated. */ - void Clear(const char* file); + void Clear(const std::string& file); /** Set the file comparison object */ void SetFileComparison(cmFileTimeComparison* fc) @@ -85,7 +88,7 @@ protected: // Return false if dependencies must be regenerated and true // otherwise. virtual bool CheckDependencies( - std::istream& internalDepends, const char* internalDependsFileName, + std::istream& internalDepends, const std::string& internalDependsFileName, std::map<std::string, DependencyVector>& validDeps); // Finalize the dependency information for the target. |