From c800f473950066c932cbb88fca17f9d31385e76c Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Mon, 11 Dec 2017 11:51:55 -0600 Subject: [PATCH 1/3] Fix forward-decl of Bindings as "class", match definition. (appease clang -Wmismatched-tags warning) --- src/nix/command.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nix/command.hh b/src/nix/command.hh index daa3b3fa7..6b34e3881 100644 --- a/src/nix/command.hh +++ b/src/nix/command.hh @@ -6,7 +6,7 @@ namespace nix { struct Value; -struct Bindings; +class Bindings; class EvalState; /* A command is an argument parser that can be executed by calling its From e4d43f1f94f7488ae8dc1139c8485446c4209836 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Mon, 11 Dec 2017 11:58:58 -0600 Subject: [PATCH 2/3] logging.cc: add missing 'override' --- src/libutil/logging.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libutil/logging.cc b/src/libutil/logging.cc index 011155871..6924e0080 100644 --- a/src/libutil/logging.cc +++ b/src/libutil/logging.cc @@ -49,6 +49,7 @@ public: void startActivity(ActivityId act, Verbosity lvl, ActivityType type, const std::string & s, const Fields & fields, ActivityId parent) + override { if (lvl <= verbosity && !s.empty()) log(lvl, s + "..."); From 00e0c416ffccf6edb63fe7f4b01422915ff12f86 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Mon, 11 Dec 2017 12:05:14 -0600 Subject: [PATCH 3/3] Mark comparison call operator as const --- src/libstore/build.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libstore/build.cc b/src/libstore/build.cc index 866964a4c..d4bd650ba 100644 --- a/src/libstore/build.cc +++ b/src/libstore/build.cc @@ -79,7 +79,7 @@ typedef std::shared_ptr GoalPtr; typedef std::weak_ptr WeakGoalPtr; struct CompareGoalPtrs { - bool operator() (const GoalPtr & a, const GoalPtr & b); + bool operator() (const GoalPtr & a, const GoalPtr & b) const; }; /* 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 s2 = b->key(); return s1 < s2;