aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-01-08 09:37:26 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-01-08 09:40:58 +0000
commitf8d478e0e274ea05882d0b3de1dbe4dcdbce0d64 (patch)
treec9b7bee9b54590c9f675398f669938209def4f78 /src
parente1b0751bc45a46bd2007338036fe3deee921eaf3 (diff)
downloadpaludis-f8d478e0e274ea05882d0b3de1dbe4dcdbce0d64.tar.gz
paludis-f8d478e0e274ea05882d0b3de1dbe4dcdbce0d64.tar.xz
Don't rely upon bind discarding args
Diffstat (limited to 'src')
-rw-r--r--src/clients/accerso/accerso.cc13
-rw-r--r--src/clients/appareo/appareo.cc10
-rw-r--r--src/clients/cave/cmd_digest.cc8
-rwxr-xr-xsrc/clients/cave/cmd_display_resolution.cc8
-rw-r--r--src/clients/cave/cmd_perform.cc8
5 files changed, 35 insertions, 12 deletions
diff --git a/src/clients/accerso/accerso.cc b/src/clients/accerso/accerso.cc
index c8e109c33..5e615f22d 100644
--- a/src/clients/accerso/accerso.cc
+++ b/src/clients/accerso/accerso.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007, 2008, 2009, 2010 Ciaran McCreesh
+ * Copyright (c) 2007, 2008, 2009, 2010, 2011 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -30,7 +30,6 @@
#include <paludis/util/map.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/pretty_print.hh>
-#include <paludis/util/return_literal_function.hh>
#include <paludis/standard_output_manager.hh>
#include <paludis/util/safe_ofstream.hh>
#include <paludis/create_output_manager_info.hh>
@@ -51,6 +50,14 @@ using std::cout;
using std::cerr;
using std::endl;
+namespace
+{
+ WantPhase want_all_phases(const std::string &)
+ {
+ return wp_yes;
+ }
+}
+
int
main(int argc, char *argv[])
{
@@ -149,7 +156,7 @@ main(int argc, char *argv[])
n::ignore_unfetched() = false,
n::make_output_manager() = std::ref(output_manager_holder),
n::safe_resume() = true,
- n::want_phase() = std::bind(return_literal_function(wp_yes))
+ n::want_phase() = &want_all_phases
));
try
diff --git a/src/clients/appareo/appareo.cc b/src/clients/appareo/appareo.cc
index 3221042d9..e18bd1b0d 100644
--- a/src/clients/appareo/appareo.cc
+++ b/src/clients/appareo/appareo.cc
@@ -2,7 +2,7 @@
/*
* Copyright (c) 2009 Kim Højgaard-Hansen
- * Copyright (c) 2007, 2008, 2009, 2010 Ciaran McCreesh
+ * Copyright (c) 2007, 2008, 2009, 2010, 2011 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -31,7 +31,6 @@
#include <paludis/util/sequence.hh>
#include <paludis/util/map.hh>
#include <paludis/util/make_named_values.hh>
-#include <paludis/util/return_literal_function.hh>
#include <paludis/repositories/e/e_repository_exceptions.hh>
#include <paludis/standard_output_manager.hh>
#include <paludis/environments/no_config/no_config_environment.hh>
@@ -60,6 +59,11 @@ namespace
return std::make_shared<StandardOutputManager>();
}
+ WantPhase want_all_phases(const std::string &)
+ {
+ return wp_yes;
+ }
+
FSPath get_location_and_add_filters()
{
Context context("When determining tree location:");
@@ -113,7 +117,7 @@ namespace
n::ignore_unfetched() = false,
n::make_output_manager() = &make_standard_output_manager,
n::safe_resume() = true,
- n::want_phase() = std::bind(return_literal_function(wp_yes))
+ n::want_phase() = &want_all_phases
));
(*i)->perform_action(a);
++success;
diff --git a/src/clients/cave/cmd_digest.cc b/src/clients/cave/cmd_digest.cc
index c47a153b4..aadfe2fca 100644
--- a/src/clients/cave/cmd_digest.cc
+++ b/src/clients/cave/cmd_digest.cc
@@ -30,7 +30,6 @@
#include <paludis/util/iterator_funcs.hh>
#include <paludis/util/map.hh>
#include <paludis/util/make_named_values.hh>
-#include <paludis/util/return_literal_function.hh>
#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/name.hh>
@@ -91,6 +90,11 @@ namespace
{
return std::make_shared<StandardOutputManager>();
}
+
+ WantPhase want_all_phases(const std::string &)
+ {
+ return wp_yes;
+ }
}
int
@@ -135,7 +139,7 @@ DigestCommand::run(
n::ignore_unfetched() = false,
n::make_output_manager() = &make_standard_output_manager,
n::safe_resume() = true,
- n::want_phase() = std::bind(return_literal_function(wp_yes))
+ n::want_phase() = &want_all_phases
));
if ((*i)->supports_action(SupportsActionTest<FetchAction>()))
diff --git a/src/clients/cave/cmd_display_resolution.cc b/src/clients/cave/cmd_display_resolution.cc
index 310323872..38ad4f035 100755
--- a/src/clients/cave/cmd_display_resolution.cc
+++ b/src/clients/cave/cmd_display_resolution.cc
@@ -40,7 +40,6 @@
#include <paludis/util/log.hh>
#include <paludis/util/pretty_print.hh>
#include <paludis/util/make_null_shared_ptr.hh>
-#include <paludis/util/return_literal_function.hh>
#include <paludis/util/enum_iterator.hh>
#include <paludis/resolver/resolutions_by_resolvent.hh>
#include <paludis/resolver/reason.hh>
@@ -134,6 +133,11 @@ namespace
}
};
+ WantPhase want_all_phases(const std::string &)
+ {
+ return wp_yes;
+ }
+
std::string get_annotation(
const std::shared_ptr<const DepSpecAnnotations> & annotations,
const DepSpecAnnotationRole role)
@@ -1124,7 +1128,7 @@ namespace
n::ignore_unfetched() = false,
n::make_output_manager() = std::ref(output_manager_holder),
n::safe_resume() = true,
- n::want_phase() = std::bind(return_literal_function(wp_yes))
+ n::want_phase() = &want_all_phases
),
totals);
id->perform_action(action);
diff --git a/src/clients/cave/cmd_perform.cc b/src/clients/cave/cmd_perform.cc
index 2dcdf172c..a4edf188e 100644
--- a/src/clients/cave/cmd_perform.cc
+++ b/src/clients/cave/cmd_perform.cc
@@ -42,7 +42,6 @@
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/iterator_funcs.hh>
-#include <paludis/util/return_literal_function.hh>
#include <paludis/util/make_null_shared_ptr.hh>
#include <cstdlib>
#include <iostream>
@@ -383,6 +382,11 @@ namespace
size = new_size;
}
};
+
+ WantPhase want_all_phases(const std::string &)
+ {
+ return wp_yes;
+ }
}
int
@@ -502,7 +506,7 @@ PerformCommand::run(
n::ignore_unfetched() = cmdline.a_ignore_unfetched.specified(),
n::make_output_manager() = std::ref(output_manager_holder),
n::safe_resume() = true,
- n::want_phase() = std::bind(return_literal_function(wp_yes))
+ n::want_phase() = &want_all_phases
));
OurPretendFetchAction pretend_fetch_action(options);
execute(env, cmdline, id, action, pretend_fetch_action, output_manager_holder);