Merge pull request #1724 from dtzWill/fix/minor-warnings

fix minor warnings
This commit is contained in:
Eelco Dolstra 2017-12-12 11:47:47 +01:00 committed by GitHub
commit de38fa9987
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

View file

@ -79,7 +79,7 @@ typedef std::shared_ptr<Goal> GoalPtr;
typedef std::weak_ptr<Goal> WeakGoalPtr; typedef std::weak_ptr<Goal> WeakGoalPtr;
struct CompareGoalPtrs { struct CompareGoalPtrs {
bool operator() (const GoalPtr & a, const GoalPtr & b); bool operator() (const GoalPtr & a, const GoalPtr & b) const;
}; };
/* Set of goals. */ /* Set of goals. */
@ -178,7 +178,7 @@ protected:
}; };
bool CompareGoalPtrs::operator() (const GoalPtr & a, const GoalPtr & b) { bool CompareGoalPtrs::operator() (const GoalPtr & a, const GoalPtr & b) const {
string s1 = a->key(); string s1 = a->key();
string s2 = b->key(); string s2 = b->key();
return s1 < s2; return s1 < s2;

View file

@ -49,6 +49,7 @@ public:
void startActivity(ActivityId act, Verbosity lvl, ActivityType type, void startActivity(ActivityId act, Verbosity lvl, ActivityType type,
const std::string & s, const Fields & fields, ActivityId parent) const std::string & s, const Fields & fields, ActivityId parent)
override
{ {
if (lvl <= verbosity && !s.empty()) if (lvl <= verbosity && !s.empty())
log(lvl, s + "..."); log(lvl, s + "...");

View file

@ -6,7 +6,7 @@
namespace nix { namespace nix {
struct Value; struct Value;
struct Bindings; class Bindings;
class EvalState; class EvalState;
/* A command is an argument parser that can be executed by calling its /* A command is an argument parser that can be executed by calling its