fixed some non-explicit conversions, so that make distcheck runs on mac yosemite

This commit is contained in:
Marc Wäckerlin
2015-05-25 08:03:36 +00:00
parent 72ff6afad7
commit e12d8fb906
6 changed files with 20 additions and 11 deletions

View File

@@ -82,7 +82,7 @@ namespace mrw {
typedef mrw::AutoResource<bfd*, int(*)(bfd*), &bfd_close, int> AutoBfd;
template<class T> class Auto {
public:
typedef mrw::AutoResource<T, void(*)(void*), &free, int, 0> Free;
typedef mrw::AutoResource<T, void(*)(void*), &free, T, (T)0> Free;
};
@endcode
@param RESOURCE_TYPE type of the resource to manage
@@ -97,7 +97,7 @@ namespace mrw {
typename FUNCTION_PTR,
FUNCTION_PTR FREE_FUNCTION,
typename INITIAL_VALUE_TYPE = RESOURCE_TYPE,
INITIAL_VALUE_TYPE INITIAL_VALUE = 0,
INITIAL_VALUE_TYPE INITIAL_VALUE = (INITIAL_VALUE_TYPE)0,
typename FREE_TYPE = RESOURCE_TYPE>
class AutoResource {
public:
@@ -436,7 +436,7 @@ namespace mrw {
*/
template<class T> class Auto {
public:
typedef mrw::AutoResource<T, void(*)(void*), &free, int, 0, void*> Free;
typedef mrw::AutoResource<T, void(*)(void*), &free, T, (T)0, void*> Free;
private:
/** @internal
work around compiler warning: