Use a struct not std::pair for SearchPathElem
I got very confused trying to keep all the `first` and `second` straight reading the code, *especially* as there is also another `(boolean, string)` pair type also being used. Named fields is much better. There are other cleanups that we can do (for example, the existing TODO), but we can do them later. Doing them now would just make this harder to review.
This commit is contained in:
+6
-2
@@ -65,8 +65,12 @@ std::string printValue(const EvalState & state, const Value & v);
|
||||
std::ostream & operator << (std::ostream & os, const ValueType t);
|
||||
|
||||
|
||||
// FIXME: maybe change this to an std::variant<SourcePath, URL>.
|
||||
typedef std::pair<std::string, std::string> SearchPathElem;
|
||||
struct SearchPathElem
|
||||
{
|
||||
std::string prefix;
|
||||
// FIXME: maybe change this to an std::variant<SourcePath, URL>.
|
||||
std::string path;
|
||||
};
|
||||
typedef std::list<SearchPathElem> SearchPath;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user