aboutsummaryrefslogtreecommitdiff
path: root/paludis/util/hashes.hh
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-06-09 21:14:17 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-06-09 21:14:17 +0100
commit5dbb7636dd880314d5b03379ebfd960b469ee6e9 (patch)
tree6a9a062efbf6aa03dcbdc92b6abf156108904ea2 /paludis/util/hashes.hh
parentc9137efc3ef08b5c52f775dd853c1c675e80cc64 (diff)
downloadpaludis-5dbb7636dd880314d5b03379ebfd960b469ee6e9.tar.gz
paludis-5dbb7636dd880314d5b03379ebfd960b469ee6e9.tar.xz
Replace Validated with WrappedValue
Slightly cleaner code, and will allow us to pass in additional validation options.
Diffstat (limited to 'paludis/util/hashes.hh')
-rw-r--r--paludis/util/hashes.hh12
1 files changed, 6 insertions, 6 deletions
diff --git a/paludis/util/hashes.hh b/paludis/util/hashes.hh
index 22910225e..0d382618d 100644
--- a/paludis/util/hashes.hh
+++ b/paludis/util/hashes.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2008 Ciaran McCreesh
+ * Copyright (c) 2008, 2010 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
@@ -21,7 +21,7 @@
#define PALUDIS_GUARD_PALUDIS_UTIL_HASHES_HH 1
#include <paludis/util/attributes.hh>
-#include <paludis/util/validated-fwd.hh>
+#include <paludis/util/wrapped_value-fwd.hh>
#include <paludis/util/fs_entry-fwd.hh>
#include <cstddef>
#include <utility>
@@ -83,12 +83,12 @@ namespace paludis
}
};
- template <typename D_, typename V_, bool b_, typename C_>
- struct Hash<Validated<D_, V_, b_, C_> >
+ template <typename Tag_>
+ struct Hash<WrappedValue<Tag_> >
{
- std::size_t operator() (const Validated<D_, V_, b_, C_> & v) const
+ std::size_t operator() (const WrappedValue<Tag_> & v) const
{
- return Hash<D_>()(v.data());
+ return Hash<typename WrappedValueTraits<Tag_>::UnderlyingType>()(v.value());
}
};