aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-05-18 23:05:03 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-05-18 23:05:03 +0000
commit6eacdf2b3ce2a8685d3fb8aa6861e6504bf426ca (patch)
treee5adc11936211a75c302b2a61f388b6a3802175a
parenta13c3fc5b9477fbc2e91a05bd2869cab7e9ac0ec (diff)
downloadpaludis-6eacdf2b3ce2a8685d3fb8aa6861e6504bf426ca.tar.gz
paludis-6eacdf2b3ce2a8685d3fb8aa6861e6504bf426ca.tar.xz
Fix g++-4.3 compile
-rw-r--r--paludis/repositories/cran/cran_description.cc23
-rw-r--r--paludis/repositories/cran/cran_description.hh15
2 files changed, 26 insertions, 12 deletions
diff --git a/paludis/repositories/cran/cran_description.cc b/paludis/repositories/cran/cran_description.cc
index 8c32143..0c0fbc5 100644
--- a/paludis/repositories/cran/cran_description.cc
+++ b/paludis/repositories/cran/cran_description.cc
@@ -25,9 +25,32 @@
#include <paludis/util/log.hh>
#include <paludis/util/strip.hh>
#include <string>
+#include <algorithm>
+#include <tr1/functional>
using namespace paludis;
+void
+CRANDescription::normalise_name(std::string & s)
+{
+ using namespace std::tr1::placeholders;
+ std::replace_if(s.begin(), s.end(), std::tr1::bind(std::equal_to<char>(), _1, '.'), '-');
+}
+
+void
+CRANDescription::denormalise_name(std::string & s)
+{
+ using namespace std::tr1::placeholders;
+ std::replace_if(s.begin(), s.end(), std::tr1::bind(std::equal_to<char>(), _1, '-'), '.');
+}
+
+void
+CRANDescription::normalise_version(std::string & s)
+{
+ using namespace std::tr1::placeholders;
+ std::replace_if(s.begin(), s.end(), std::tr1::bind(std::equal_to<char>(), _1, '-'), '.');
+}
+
CRANDescription::CRANDescription(const std::string & n, const FSEntry & f, bool installed) :
name("cran/" + n),
version("0"),
diff --git a/paludis/repositories/cran/cran_description.hh b/paludis/repositories/cran/cran_description.hh
index b1522b7..ea9c05a 100644
--- a/paludis/repositories/cran/cran_description.hh
+++ b/paludis/repositories/cran/cran_description.hh
@@ -45,22 +45,13 @@ namespace paludis
time_t installed_time;
/// Turn a CRAN package name into a paludis package name.
- static void normalise_name(std::string & s)
- {
- std::replace_if(s.begin(), s.end(), std::bind2nd(std::equal_to<char>(), '.'), '-');
- }
+ static void normalise_name(std::string & s);
/// Turn a paludis package name into a CRAN package name.
- static void denormalise_name(std::string & s)
- {
- std::replace_if(s.begin(), s.end(), std::bind2nd(std::equal_to<char>(), '-'), '.');
- }
+ static void denormalise_name(std::string & s);
/// Turn a CRAN package version into a paludis package version.
- static void normalise_version(std::string & s)
- {
- std::replace_if(s.begin(), s.end(), std::bind2nd(std::equal_to<char>(), '-'), '.');
- }
+ static void normalise_version(std::string & s);
/// Constructor
CRANDescription(const std::string & n, const FSEntry & f, bool installed);