src: Updating code style to conform (more or less) to ndn-cxx style
Also, adding .clang-format that describes the applied style. Note that
this style requires a slightly customized version of clang-format.
diff --git a/utils/trie/empty-policy.hpp b/utils/trie/empty-policy.hpp
index c610717..7d077b6 100644
--- a/utils/trie/empty-policy.hpp
+++ b/utils/trie/empty-policy.hpp
@@ -28,29 +28,47 @@
/**
* @brief Traits for empty (bogus) replacement policy
*/
-struct empty_policy_traits
-{
+struct empty_policy_traits {
/// @brief Name that can be used to identify the policy (for NS-3 object model and logging)
- static std::string GetName () { return ""; }
+ static std::string
+ GetName()
+ {
+ return "";
+ }
typedef void* policy_hook_type;
- template<class Container> struct container_hook { typedef void* type; };
+ template<class Container>
+ struct container_hook {
+ typedef void* type;
+ };
- template<class Base,
- class Container,
- class Hook>
- struct policy
- {
- struct type
- {
- inline type (Base &base) {}
-
- inline void update (typename Container::iterator) { }
- inline bool insert (typename Container::iterator) { return true; }
- inline void lookup (typename Container::iterator item) { }
- inline void erase (typename Container::iterator item) { }
- inline void clear () { }
+ template<class Base, class Container, class Hook>
+ struct policy {
+ struct type {
+ inline type(Base& base)
+ {
+ }
+
+ inline void update(typename Container::iterator)
+ {
+ }
+ inline bool insert(typename Container::iterator)
+ {
+ return true;
+ }
+ inline void
+ lookup(typename Container::iterator item)
+ {
+ }
+ inline void
+ erase(typename Container::iterator item)
+ {
+ }
+ inline void
+ clear()
+ {
+ }
};
};
};