diff options
author | Kjell Ahlstedt <kjell.ahlstedt@bredband.net> | 2012-09-12 16:49:22 +0200 |
---|---|---|
committer | Kjell Ahlstedt <kjell.ahlstedt@bredband.net> | 2012-09-12 16:49:22 +0200 |
commit | 1c2c94f611071085af02a4d5eea83a0958cd9cff (patch) | |
tree | 3be416d8c082364a31e73fc82e32f8eb57551fdd /glib/glibmm | |
parent | e71530f74bbd4f573273f5babe1aae24b4f4bb36 (diff) | |
download | glibmm-1c2c94f611071085af02a4d5eea83a0958cd9cff.tar.gz |
Use std::size_t and std::ptrdiff_t.
* glib/glibmm/arrayhandle.h:
* glib/glibmm/containers.h:
* glib/glibmm/listhandle.h:
* glib/glibmm/slisthandle.h:
* glib/glibmm/vectorutils.h: Use std::size_t and std::ptrdiff_t instead
of ::size_t and ::ptrdiff_t. Only the std versions are required to be
declared in <cstddef>.
* examples/network/resolver.cc:
* glib/glibmm/containerhandle_shared.h:
* glib/glibmm/helperlist.h:
* glib/glibmm/main.h:
* glib/glibmm/vectorutils.cc: Use std::size_t instead of ::size_t.
* glib/src/convert.hg: Use std::size_t instead of ::size_t in a comment.
* glib/glibmm/property.cc:
* glib/glibmm/ustring.h: Use std::ptrdiff_t instead of ::ptrdiff_t.
Diffstat (limited to 'glib/glibmm')
-rw-r--r-- | glib/glibmm/arrayhandle.h | 56 | ||||
-rw-r--r-- | glib/glibmm/containerhandle_shared.h | 2 | ||||
-rw-r--r-- | glib/glibmm/containers.h | 13 | ||||
-rw-r--r-- | glib/glibmm/helperlist.h | 4 | ||||
-rw-r--r-- | glib/glibmm/listhandle.h | 14 | ||||
-rw-r--r-- | glib/glibmm/main.h | 5 | ||||
-rw-r--r-- | glib/glibmm/property.cc | 2 | ||||
-rw-r--r-- | glib/glibmm/slisthandle.h | 14 | ||||
-rw-r--r-- | glib/glibmm/ustring.h | 6 | ||||
-rw-r--r-- | glib/glibmm/vectorutils.cc | 4 | ||||
-rw-r--r-- | glib/glibmm/vectorutils.h | 25 |
11 files changed, 74 insertions, 71 deletions
diff --git a/glib/glibmm/arrayhandle.h b/glib/glibmm/arrayhandle.h index 4db56470..6938c641 100644 --- a/glib/glibmm/arrayhandle.h +++ b/glib/glibmm/arrayhandle.h @@ -33,7 +33,7 @@ namespace Container_Helpers /* Count the number of elements in a 0-terminated sequence. */ template <class T> inline -size_t compute_array_size(const T* array) +std::size_t compute_array_size(const T* array) { const T* pend = array; @@ -47,7 +47,7 @@ size_t compute_array_size(const T* array) * specifies the number of elements in the input sequence. */ template <class For, class Tr> -typename Tr::CType* create_array(For pbegin, size_t size, Tr) +typename Tr::CType* create_array(For pbegin, std::size_t size, Tr) { typedef typename Tr::CType CType; @@ -66,7 +66,7 @@ typename Tr::CType* create_array(For pbegin, size_t size, Tr) } template <class For> -gboolean* create_bool_array(For pbegin, size_t size) +gboolean* create_bool_array(For pbegin, std::size_t size) { gboolean *const array(static_cast<gboolean*>(g_malloc((size + 1) * sizeof(gboolean)))); gboolean *const array_end(array + size); @@ -89,10 +89,10 @@ struct ArraySourceTraits { typedef typename Tr::CType CType; - static size_t get_size(const Cont& cont) + static std::size_t get_size(const Cont& cont) { return cont.size(); } - static const CType* get_data(const Cont& cont, size_t size) + static const CType* get_data(const Cont& cont, std::size_t size) { return Glib::Container_Helpers::create_array(cont.begin(), size, Tr()); } static const Glib::OwnershipType initial_ownership = Glib::OWNERSHIP_SHALLOW; @@ -104,10 +104,10 @@ struct BoolArraySourceTraits { typedef gboolean CType; - static size_t get_size(const Cont& cont) + static std::size_t get_size(const Cont& cont) { return cont.size(); } - static const CType* get_data(const Cont& cont, size_t size) + static const CType* get_data(const Cont& cont, std::size_t size) { return Glib::Container_Helpers::create_bool_array(cont.begin(), size); } static const Glib::OwnershipType initial_ownership = Glib::OWNERSHIP_SHALLOW; @@ -120,10 +120,10 @@ struct ArraySourceTraits<Tr,Cont*> { typedef typename Tr::CType CType; - static size_t get_size(const CType* array) + static std::size_t get_size(const CType* array) { return (array) ? Glib::Container_Helpers::compute_array_size(array) : 0; } - static const CType* get_data(const CType* array, size_t) + static const CType* get_data(const CType* array, std::size_t) { return array; } static const Glib::OwnershipType initial_ownership = Glib::OWNERSHIP_NONE; @@ -138,21 +138,21 @@ struct ArraySourceTraits<Tr,const Cont*> : ArraySourceTraits<Tr,Cont*> * For consistency, the array must be 0-terminated, even though the array * size is known at compile time. */ -template <class Tr, class Cont, size_t N> +template <class Tr, class Cont, std::size_t N> struct ArraySourceTraits<Tr,Cont[N]> { typedef typename Tr::CType CType; - static size_t get_size(const CType*) + static std::size_t get_size(const CType*) { return (N - 1); } - static const CType* get_data(const CType* array, size_t) + static const CType* get_data(const CType* array, std::size_t) { return array; } static const Glib::OwnershipType initial_ownership = Glib::OWNERSHIP_NONE; }; -template <class Tr, class Cont, size_t N> +template <class Tr, class Cont, std::size_t N> struct ArraySourceTraits<Tr,const Cont[N]> : ArraySourceTraits<Tr,Cont[N]> {}; @@ -171,7 +171,7 @@ public: typedef std::random_access_iterator_tag iterator_category; typedef CppType value_type; - typedef ptrdiff_t difference_type; + typedef std::ptrdiff_t difference_type; typedef value_type reference; typedef void pointer; @@ -227,8 +227,8 @@ public: typedef typename Tr::CType CType; typedef CppType value_type; - typedef size_t size_type; - typedef ptrdiff_t difference_type; + typedef std::size_t size_type; + typedef std::ptrdiff_t difference_type; typedef Glib::Container_Helpers::ArrayHandleIterator<Tr> const_iterator; typedef Glib::Container_Helpers::ArrayHandleIterator<Tr> iterator; @@ -237,7 +237,7 @@ public: ArrayHandle(const Cont& container); // Take over ownership of an array created by GTK+ functions. - inline ArrayHandle(const CType* array, size_t array_size, Glib::OwnershipType ownership); + inline ArrayHandle(const CType* array, std::size_t array_size, Glib::OwnershipType ownership); inline ArrayHandle(const CType* array, Glib::OwnershipType ownership); // Copying clears the ownership flag of the source handle. @@ -259,11 +259,11 @@ public: void copy(Out pdest) const; inline const CType* data() const; - inline size_t size() const; + inline std::size_t size() const; inline bool empty() const; private: - size_t size_; + std::size_t size_; const CType* parray_; mutable Glib::OwnershipType ownership_; @@ -282,8 +282,8 @@ public: typedef Tr::CType CType; typedef CppType value_type; - typedef size_t size_type; - typedef ptrdiff_t difference_type; + typedef std::size_t size_type; + typedef std::ptrdiff_t difference_type; typedef Glib::Container_Helpers::ArrayHandleIterator<Tr> const_iterator; typedef Glib::Container_Helpers::ArrayHandleIterator<Tr> iterator; @@ -292,7 +292,7 @@ public: ArrayHandle(const Cont& container); // Take over ownership of an array created by GTK+ functions. - inline ArrayHandle(const CType* array, size_t array_size, Glib::OwnershipType ownership); + inline ArrayHandle(const CType* array, std::size_t array_size, Glib::OwnershipType ownership); inline ArrayHandle(const CType* array, Glib::OwnershipType ownership); // Copying clears the ownership flag of the source handle. @@ -347,11 +347,11 @@ public: void copy(Out pdest) const; inline const CType* data() const; - inline size_t size() const; + inline std::size_t size() const; inline bool empty() const; private: - size_t size_; + std::size_t size_; const CType* parray_; mutable Glib::OwnershipType ownership_; @@ -517,7 +517,7 @@ ArrayHandle<T,Tr>::ArrayHandle(const Cont& container) {} template <class T, class Tr> inline -ArrayHandle<T,Tr>::ArrayHandle(const typename ArrayHandle<T,Tr>::CType* array, size_t array_size, +ArrayHandle<T,Tr>::ArrayHandle(const typename ArrayHandle<T,Tr>::CType* array, std::size_t array_size, Glib::OwnershipType ownership) : size_ ((array) ? array_size : 0), @@ -644,7 +644,7 @@ const typename ArrayHandle<T,Tr>::CType* ArrayHandle<T,Tr>::data() const } template <class T, class Tr> inline -size_t ArrayHandle<T,Tr>::size() const +std::size_t ArrayHandle<T,Tr>::size() const { return size_; } @@ -668,7 +668,7 @@ ArrayHandle<bool,Container_Helpers::TypeTraits<bool> >::ArrayHandle(const Cont& {} inline -ArrayHandle<bool,Container_Helpers::TypeTraits<bool> >::ArrayHandle(const gboolean* array, size_t array_size, +ArrayHandle<bool,Container_Helpers::TypeTraits<bool> >::ArrayHandle(const gboolean* array, std::size_t array_size, Glib::OwnershipType ownership) : size_ ((array) ? array_size : 0), @@ -734,7 +734,7 @@ const gboolean* ArrayHandle<bool,Container_Helpers::TypeTraits<bool> >::data() c } inline -size_t ArrayHandle<bool,Container_Helpers::TypeTraits<bool> >::size() const +std::size_t ArrayHandle<bool,Container_Helpers::TypeTraits<bool> >::size() const { return size_; } diff --git a/glib/glibmm/containerhandle_shared.h b/glib/glibmm/containerhandle_shared.h index 807abf3d..cd338677 100644 --- a/glib/glibmm/containerhandle_shared.h +++ b/glib/glibmm/containerhandle_shared.h @@ -74,7 +74,7 @@ public: Iterator begin() const { return pbegin_; } Iterator end() const { return pend_; } - size_t size() const { return std::distance(pbegin_, pend_); } + std::size_t size() const { return std::distance(pbegin_, pend_); } }; /** Helper function to create a Glib::Sequence<> object, which diff --git a/glib/glibmm/containers.h b/glib/glibmm/containers.h index 8775495a..390879a2 100644 --- a/glib/glibmm/containers.h +++ b/glib/glibmm/containers.h @@ -25,6 +25,7 @@ #include <glibmm/sarray.h> /* for backward compatibility */ #include <glib.h> #include <iterator> +#include <cstddef> #ifndef DOXYGEN_SHOULD_SKIP_THIS @@ -58,8 +59,8 @@ class List_Iterator : public List_Iterator_Base<T> { public: typedef std::bidirectional_iterator_tag iterator_category; - typedef size_t size_type; - typedef ptrdiff_t difference_type; + typedef std::size_t size_type; + typedef std::ptrdiff_t difference_type; typedef typename List_Iterator_Base<T>::pointer pointer; typedef typename List_Iterator_Base<T>::reference reference; @@ -131,8 +132,8 @@ class SList_Iterator : public List_Iterator_Base<T> { public: typedef std::forward_iterator_tag iterator_category; - typedef size_t size_type; - typedef ptrdiff_t difference_type; + typedef std::size_t size_type; + typedef std::ptrdiff_t difference_type; typedef typename List_Iterator_Base<T>::pointer pointer; typedef typename List_Iterator_Base<T>::reference reference; @@ -185,8 +186,8 @@ class List_Cpp_Iterator : public List_Iterator_Base<T_IFace> { public: typedef std::bidirectional_iterator_tag iterator_category; - typedef size_t size_type; - typedef ptrdiff_t difference_type; + typedef std::size_t size_type; + typedef std::ptrdiff_t difference_type; typedef typename List_Iterator_Base<T_IFace>::pointer pointer; typedef typename List_Iterator_Base<T_IFace>::reference reference; diff --git a/glib/glibmm/helperlist.h b/glib/glibmm/helperlist.h index e5ac4cc2..dfdc0706 100644 --- a/glib/glibmm/helperlist.h +++ b/glib/glibmm/helperlist.h @@ -54,8 +54,8 @@ public: typedef T_CppElement element_type; - typedef size_t difference_type; - typedef size_t size_type; + typedef std::size_t difference_type; //TODO Why not std::ptrdiff_t? + typedef std::size_t size_type; //These are implemented differently for each Helper List. virtual iterator erase(iterator) = 0; diff --git a/glib/glibmm/listhandle.h b/glib/glibmm/listhandle.h index 4716064b..84c71b6c 100644 --- a/glib/glibmm/listhandle.h +++ b/glib/glibmm/listhandle.h @@ -101,7 +101,7 @@ struct ListSourceTraits<Tr,const Cont*> : ListSourceTraits<Tr,Cont*> * to the first element. For consistency, the array must be 0-terminated, * even though the array size is known at compile time. */ -template <class Tr, class Cont, size_t N> +template <class Tr, class Cont, std::size_t N> struct ListSourceTraits<Tr,Cont[N]> { static GList* get_data(const Cont* array) @@ -110,7 +110,7 @@ struct ListSourceTraits<Tr,Cont[N]> static const Glib::OwnershipType initial_ownership = Glib::OWNERSHIP_SHALLOW; }; -template <class Tr, class Cont, size_t N> +template <class Tr, class Cont, std::size_t N> struct ListSourceTraits<Tr,const Cont[N]> : ListSourceTraits<Tr,Cont[N]> {}; @@ -129,7 +129,7 @@ public: typedef std::forward_iterator_tag iterator_category; typedef CppType value_type; - typedef ptrdiff_t difference_type; + typedef std::ptrdiff_t difference_type; typedef value_type reference; typedef void pointer; @@ -166,8 +166,8 @@ public: typedef typename Tr::CType CType; typedef CppType value_type; - typedef size_t size_type; - typedef ptrdiff_t difference_type; + typedef std::size_t size_type; + typedef std::ptrdiff_t difference_type; typedef Glib::Container_Helpers::ListHandleIterator<Tr> const_iterator; typedef Glib::Container_Helpers::ListHandleIterator<Tr> iterator; @@ -197,7 +197,7 @@ public: void copy(Out pdest) const; inline GList* data() const; - inline size_t size() const; + inline std::size_t size() const; inline bool empty() const; private: @@ -388,7 +388,7 @@ GList* ListHandle<T,Tr>::data() const } template <class T, class Tr> inline -size_t ListHandle<T,Tr>::size() const +std::size_t ListHandle<T,Tr>::size() const { return g_list_length(plist_); } diff --git a/glib/glibmm/main.h b/glib/glibmm/main.h index b5fd3ab9..55f310b5 100644 --- a/glib/glibmm/main.h +++ b/glib/glibmm/main.h @@ -26,6 +26,7 @@ #include <glibmm/iochannel.h> #include <sigc++/sigc++.h> #include <vector> +#include <cstddef> namespace Glib { @@ -493,7 +494,7 @@ public: private: // Glib::MainContext can neither be constructed nor deleted. MainContext(); - void operator delete(void*, size_t); + void operator delete(void*, std::size_t); // noncopyable MainContext(const MainContext& other); @@ -553,7 +554,7 @@ public: private: // Glib::MainLoop can neither be constructed nor deleted. MainLoop(); - void operator delete(void*, size_t); + void operator delete(void*, std::size_t); MainLoop(const MainLoop&); MainLoop& operator=(const MainLoop&); diff --git a/glib/glibmm/property.cc b/glib/glibmm/property.cc index afb92b01..3b73b6b2 100644 --- a/glib/glibmm/property.cc +++ b/glib/glibmm/property.cc @@ -82,7 +82,7 @@ static unsigned int property_to_id(Glib::ObjectBase& object, Glib::PropertyBase& void *const base_ptr = dynamic_cast<void*>(&object); void *const prop_ptr = &property; - const ptrdiff_t offset = static_cast<guint8*>(prop_ptr) - static_cast<guint8*>(base_ptr); + const std::ptrdiff_t offset = static_cast<guint8*>(prop_ptr) - static_cast<guint8*>(base_ptr); g_return_val_if_fail(offset > 0 && offset < G_MAXINT, 0); diff --git a/glib/glibmm/slisthandle.h b/glib/glibmm/slisthandle.h index 2885e944..67728f50 100644 --- a/glib/glibmm/slisthandle.h +++ b/glib/glibmm/slisthandle.h @@ -101,7 +101,7 @@ struct SListSourceTraits<Tr,const Cont*> : SListSourceTraits<Tr,Cont*> * to the first element. For consistency, the array must be 0-terminated, * even though the array size is known at compile time. */ -template <class Tr, class Cont, size_t N> +template <class Tr, class Cont, std::size_t N> struct SListSourceTraits<Tr,Cont[N]> { static GSList* get_data(const Cont* array) @@ -110,7 +110,7 @@ struct SListSourceTraits<Tr,Cont[N]> static const Glib::OwnershipType initial_ownership = Glib::OWNERSHIP_SHALLOW; }; -template <class Tr, class Cont, size_t N> +template <class Tr, class Cont, std::size_t N> struct SListSourceTraits<Tr,const Cont[N]> : SListSourceTraits<Tr,Cont[N]> {}; @@ -129,7 +129,7 @@ public: typedef std::forward_iterator_tag iterator_category; typedef CppType value_type; - typedef ptrdiff_t difference_type; + typedef std::ptrdiff_t difference_type; typedef value_type reference; typedef void pointer; @@ -166,8 +166,8 @@ public: typedef typename Tr::CType CType; typedef CppType value_type; - typedef size_t size_type; - typedef ptrdiff_t difference_type; + typedef std::size_t size_type; + typedef std::ptrdiff_t difference_type; typedef Glib::Container_Helpers::SListHandleIterator<Tr> const_iterator; typedef Glib::Container_Helpers::SListHandleIterator<Tr> iterator; @@ -196,7 +196,7 @@ public: void copy(Out pdest) const; inline GSList* data() const; - inline size_t size() const; + inline std::size_t size() const; inline bool empty() const; private: @@ -387,7 +387,7 @@ GSList* SListHandle<T,Tr>::data() const } template <class T, class Tr> inline -size_t SListHandle<T,Tr>::size() const +std::size_t SListHandle<T,Tr>::size() const { return g_slist_length(pslist_); } diff --git a/glib/glibmm/ustring.h b/glib/glibmm/ustring.h index 047682df..1780383b 100644 --- a/glib/glibmm/ustring.h +++ b/glib/glibmm/ustring.h @@ -30,7 +30,7 @@ #include <sstream> #include <string> #ifndef GLIBMM_HAVE_STD_ITERATOR_TRAITS -#include <cstddef> /* for ptrdiff_t */ +#include <cstddef> /* for std::ptrdiff_t */ #endif namespace Glib @@ -54,7 +54,7 @@ struct IteratorTraits<T*> { typedef std::random_access_iterator_tag iterator_category; typedef T value_type; - typedef ptrdiff_t difference_type; + typedef std::ptrdiff_t difference_type; typedef T* pointer; typedef T& reference; }; @@ -64,7 +64,7 @@ struct IteratorTraits<const T*> { typedef std::random_access_iterator_tag iterator_category; typedef T value_type; - typedef ptrdiff_t difference_type; + typedef std::ptrdiff_t difference_type; typedef const T* pointer; typedef const T& reference; }; diff --git a/glib/glibmm/vectorutils.cc b/glib/glibmm/vectorutils.cc index b7cf34c2..f013b544 100644 --- a/glib/glibmm/vectorutils.cc +++ b/glib/glibmm/vectorutils.cc @@ -23,7 +23,7 @@ namespace Glib namespace Container_Helpers { -gboolean* create_bool_array(std::vector<bool>::const_iterator pbegin, size_t size) +gboolean* create_bool_array(std::vector<bool>::const_iterator pbegin, std::size_t size) { gboolean *const array(static_cast<gboolean*>(g_malloc((size + 1) * sizeof(gboolean)))); gboolean *const array_end(array + size); @@ -43,7 +43,7 @@ gboolean* create_bool_array(std::vector<bool>::const_iterator pbegin, size_t siz /**** Glib::ArrayHandler<bool> ************************/ ArrayHandler<bool, Glib::Container_Helpers::TypeTraits<bool> >::VectorType -ArrayHandler<bool, Glib::Container_Helpers::TypeTraits<bool> >::array_to_vector(const CType* array, size_t array_size, Glib::OwnershipType ownership) +ArrayHandler<bool, Glib::Container_Helpers::TypeTraits<bool> >::array_to_vector(const CType* array, std::size_t array_size, Glib::OwnershipType ownership) { if(array) { diff --git a/glib/glibmm/vectorutils.h b/glib/glibmm/vectorutils.h index 6796d838..15714e07 100644 --- a/glib/glibmm/vectorutils.h +++ b/glib/glibmm/vectorutils.h @@ -21,6 +21,7 @@ #include <vector> #include <glibmmconfig.h> #include <glibmm/containerhandle_shared.h> +#include <cstddef> /* There are three types of functions: * 1. Returning a container. @@ -68,7 +69,7 @@ namespace Container_Helpers /* Count the number of elements in a 0-terminated sequence. */ template <class T> inline -size_t compute_array_size2(const T* array) +std::size_t compute_array_size2(const T* array) { if(array) { @@ -88,7 +89,7 @@ size_t compute_array_size2(const T* array) * specifies the number of elements in the input sequence. */ template <class Tr> -typename Tr::CType* create_array(typename std::vector<typename Tr::CppType>::const_iterator pbegin, size_t size) +typename Tr::CType* create_array(typename std::vector<typename Tr::CppType>::const_iterator pbegin, std::size_t size) { typedef typename Tr::CType CType; @@ -110,7 +111,7 @@ typename Tr::CType* create_array(typename std::vector<typename Tr::CppType>::con * which does not conform to being an STL container. */ gboolean* create_bool_array(std::vector<bool>::const_iterator pbegin, - size_t size); + std::size_t size); /* Create and fill a GList as efficient as possible. * This requires bidirectional iterators. @@ -162,7 +163,7 @@ public: typedef std::random_access_iterator_tag iterator_category; typedef CppType value_type; - typedef ptrdiff_t difference_type; + typedef std::ptrdiff_t difference_type; typedef value_type reference; typedef void pointer; @@ -203,7 +204,7 @@ public: typedef std::forward_iterator_tag iterator_category; typedef CppType value_type; - typedef ptrdiff_t difference_type; + typedef std::ptrdiff_t difference_type; typedef value_type reference; typedef void pointer; @@ -229,7 +230,7 @@ public: typedef std::forward_iterator_tag iterator_category; typedef CppType value_type; - typedef ptrdiff_t difference_type; + typedef std::ptrdiff_t difference_type; typedef value_type reference; typedef void pointer; @@ -287,7 +288,7 @@ public: * @param array_size - length of @a array. * @param ownership - ownership definition. */ - explicit inline ArrayKeeper(const CType* array, size_t array_size, Glib::OwnershipType ownership); + explicit inline ArrayKeeper(const CType* array, std::size_t array_size, Glib::OwnershipType ownership); inline ArrayKeeper(const ArrayKeeper& keeper); ~ArrayKeeper(); @@ -301,7 +302,7 @@ public: private: CType* array_; - size_t array_size_; + std::size_t array_size_; mutable Glib::OwnershipType ownership_; }; @@ -466,7 +467,7 @@ public: typedef typename Glib::Container_Helpers::ArrayIterator<Tr> ArrayIteratorType; // maybe think about using C++0x move constructors? - static VectorType array_to_vector(const CType* array, size_t array_size, Glib::OwnershipType ownership); + static VectorType array_to_vector(const CType* array, std::size_t array_size, Glib::OwnershipType ownership); static VectorType array_to_vector(const CType* array, Glib::OwnershipType ownership); static ArrayKeeperType vector_to_array(const VectorType& vector); }; @@ -482,7 +483,7 @@ public: typedef Glib::Container_Helpers::ArrayIterator<Glib::Container_Helpers::TypeTraits<bool> > ArrayIteratorType; // maybe think about using C++0x move constructors? - static VectorType array_to_vector(const CType* array, size_t array_size, Glib::OwnershipType ownership); + static VectorType array_to_vector(const CType* array, std::size_t array_size, Glib::OwnershipType ownership); static VectorType array_to_vector(const CType* array, Glib::OwnershipType ownership); static ArrayKeeperType vector_to_array(const VectorType& vector); }; @@ -768,7 +769,7 @@ bool SListIterator<Tr>::operator!=(const SListIterator<Tr>& rhs) const /**** Glib::Container_Helpers::ArrayKeeper<> ************************/ template <typename Tr> -inline ArrayKeeper<Tr>::ArrayKeeper(const CType* array, size_t array_size, Glib::OwnershipType ownership) +inline ArrayKeeper<Tr>::ArrayKeeper(const CType* array, std::size_t array_size, Glib::OwnershipType ownership) : array_(const_cast<CType*>(array)), array_size_(array_size), @@ -901,7 +902,7 @@ inline GSList* GSListKeeper<Tr>::data() const template <typename T, class Tr> typename ArrayHandler<T, Tr>::VectorType -ArrayHandler<T, Tr>::array_to_vector(const CType* array, size_t array_size, Glib::OwnershipType ownership) +ArrayHandler<T, Tr>::array_to_vector(const CType* array, std::size_t array_size, Glib::OwnershipType ownership) { if (array) { |