2323#ifndef H5ID_WRAPPER_HPP
2424#define H5ID_WRAPPER_HPP
2525
26+ #include " splash/core/splashMacros.hpp"
27+
2628#include < hdf5.h>
2729
30+
2831namespace splash
2932{
30-
3133 namespace policies
3234 {
3335 template <typename T>
@@ -36,10 +38,9 @@ namespace splash
3638 static T copy (const T&)
3739 {
3840 // Make it depend on template parameter
39- static char copyNotAllowed[sizeof (T) ? -1 : 0 ];
40- (void ) copyNotAllowed;
41+ SPLASH_UNUSED static char copyNotAllowed[sizeof (T) ? -1 : 0 ];
4142 }
42-
43+
4344 static bool release (const T&)
4445 {
4546 return true ;
@@ -53,13 +54,13 @@ namespace splash
5354 {
5455 *refCt_ = 1 ;
5556 }
56-
57+
5758 T copy (const T& obj)
5859 {
5960 ++*refCt_;
6061 return obj;
6162 }
62-
63+
6364 bool release (const T&)
6465 {
6566 if (!--*refCt_)
@@ -70,7 +71,7 @@ namespace splash
7071 }
7172 return false ;
7273 }
73-
74+
7475 friend void swap (RefCounted& lhs, RefCounted& rhs)
7576 {
7677 std::swap (lhs.refCt_ , rhs.refCt_ );
@@ -79,7 +80,7 @@ namespace splash
7980 unsigned * refCt_;
8081 };
8182 }
82-
83+
8384 /* * RAII wrapper for a hid_t (HDF5 identifier)
8485 * Calls T_CloseMethod on destruction and allows implicit conversion
8586 * Calls T_DestructionPolicy::copy on copy which should return the id to store
@@ -89,7 +90,7 @@ namespace splash
8990 struct H5IdWrapper: public T_DestructionPolicy<hid_t>
9091 {
9192 typedef T_DestructionPolicy<hid_t > DestructionPolicy;
92-
93+
9394 H5IdWrapper (): id_ (-1 ){}
9495 explicit H5IdWrapper (hid_t id): id_ (id){}
9596 H5IdWrapper (const H5IdWrapper& rhs): DestructionPolicy (rhs)
@@ -137,7 +138,7 @@ namespace splash
137138
138139 operator hid_t () const { return id_; }
139140 operator bool () const { return id_ >= 0 ; }
140-
141+
141142 friend void swap (H5IdWrapper& lhs, H5IdWrapper& rhs)
142143 {
143144 std::swap (lhs.id_ , rhs.id_ );
0 commit comments