From b2157a47efd33144c65cb46902c89dafba7acfcb Mon Sep 17 00:00:00 2001 From: Murray Cumming Date: Fri, 26 Feb 2016 14:14:04 +0100 Subject: Run clang-format on glib .h files. --- glib/glibmm/vectorutils.h | 411 ++++++++++++++++++++++++---------------------- 1 file changed, 215 insertions(+), 196 deletions(-) (limited to 'glib/glibmm/vectorutils.h') diff --git a/glib/glibmm/vectorutils.h b/glib/glibmm/vectorutils.h index a85ad97b..40231dbe 100644 --- a/glib/glibmm/vectorutils.h +++ b/glib/glibmm/vectorutils.h @@ -68,18 +68,19 @@ namespace Container_Helpers /* Count the number of elements in a 0-terminated sequence. */ -template inline -std::size_t compute_array_size2(const T* array) +template +inline std::size_t +compute_array_size2(const T* array) { - if(array) + if (array) { const T* pend(array); - while(*pend) + while (*pend) { ++pend; } - return(pend - array); + return (pend - array); } return 0; @@ -89,14 +90,15 @@ std::size_t compute_array_size2(const T* array) * specifies the number of elements in the input sequence. */ template -typename Tr::CType* create_array(typename std::vector::const_iterator pbegin, std::size_t size) +typename Tr::CType* +create_array(typename std::vector::const_iterator pbegin, std::size_t size) { typedef typename Tr::CType CType; - CType *const array(static_cast(g_malloc((size + 1) * sizeof(CType)))); - CType *const array_end(array + size); + CType* const array(static_cast(g_malloc((size + 1) * sizeof(CType)))); + CType* const array_end(array + size); - for(CType* pdest(array); pdest != array_end; ++pdest) + for (CType* pdest(array); pdest != array_end; ++pdest) { // Use & to force a warning if the iterator returns a temporary object. *pdest = Tr::to_c_type(*&*pbegin); @@ -110,22 +112,22 @@ typename Tr::CType* create_array(typename std::vector::con /* first class function for bools, because std::vector is a specialization * which does not conform to being an STL container. */ -gboolean* create_bool_array(std::vector::const_iterator pbegin, - std::size_t size); +gboolean* create_bool_array(std::vector::const_iterator pbegin, std::size_t size); /* Create and fill a GList as efficient as possible. * This requires bidirectional iterators. */ template -GList* create_glist(const typename std::vector::const_iterator pbegin, - typename std::vector::const_iterator pend) +GList* +create_glist(const typename std::vector::const_iterator pbegin, + typename std::vector::const_iterator pend) { GList* head(nullptr); - while(pend != pbegin) + while (pend != pbegin) { // Use & to force a warning if the iterator returns a temporary object. - const void *const item(Tr::to_c_type(*&*--pend)); + const void* const item(Tr::to_c_type(*&*--pend)); head = g_list_prepend(head, const_cast(item)); } @@ -136,15 +138,16 @@ GList* create_glist(const typename std::vector::const_iter * This requires bidirectional iterators. */ template -GSList* create_gslist(const typename std::vector::const_iterator pbegin, - typename std::vector::const_iterator pend) +GSList* +create_gslist(const typename std::vector::const_iterator pbegin, + typename std::vector::const_iterator pend) { GSList* head(nullptr); - while(pend != pbegin) + while (pend != pbegin) { // Use & to force a warning if the iterator returns a temporary object. - const void *const item(Tr::to_c_type(*&*--pend)); + const void* const item(Tr::to_c_type(*&*--pend)); head = g_slist_prepend(head, const_cast(item)); } @@ -153,33 +156,32 @@ GSList* create_gslist(const typename std::vector::const_it #endif /* DOXYGEN_SHOULD_SKIP_THIS */ - template class ArrayIterator { public: - typedef typename Tr::CppType CppType; - typedef typename Tr::CType CType; + typedef typename Tr::CppType CppType; + typedef typename Tr::CType CType; - typedef std::random_access_iterator_tag iterator_category; - typedef CppType value_type; - typedef std::ptrdiff_t difference_type; - typedef value_type reference; - typedef void pointer; + typedef std::random_access_iterator_tag iterator_category; + typedef CppType value_type; + typedef std::ptrdiff_t difference_type; + typedef value_type reference; + typedef void pointer; explicit inline ArrayIterator(const CType* pos); inline value_type operator*() const; inline value_type operator[](difference_type offset) const; - inline ArrayIterator & operator++(); + inline ArrayIterator& operator++(); inline const ArrayIterator operator++(int); // All this random access stuff is only there because STL algorithms // usually have optimized specializations for random access iterators, // and we don't want to give away efficiency for nothing. - inline ArrayIterator& operator+=(difference_type rhs); - inline ArrayIterator& operator-=(difference_type rhs); + inline ArrayIterator& operator+=(difference_type rhs); + inline ArrayIterator& operator-=(difference_type rhs); inline const ArrayIterator operator+(difference_type rhs) const; inline const ArrayIterator operator-(difference_type rhs) const; inline difference_type operator-(const ArrayIterator& rhs) const; @@ -199,20 +201,20 @@ template class ListIterator { public: - typedef typename Tr::CppType CppType; - typedef typename Tr::CType CType; + typedef typename Tr::CppType CppType; + typedef typename Tr::CType CType; - typedef std::forward_iterator_tag iterator_category; - typedef CppType value_type; - typedef std::ptrdiff_t difference_type; - typedef value_type reference; - typedef void pointer; + typedef std::forward_iterator_tag iterator_category; + typedef CppType value_type; + typedef std::ptrdiff_t difference_type; + typedef value_type reference; + typedef void pointer; explicit inline ListIterator(const GList* node); - inline value_type operator*() const; - inline ListIterator& operator++(); - inline const ListIterator operator++(int); + inline value_type operator*() const; + inline ListIterator& operator++(); + inline const ListIterator operator++(int); inline bool operator==(const ListIterator& rhs) const; inline bool operator!=(const ListIterator& rhs) const; @@ -225,20 +227,20 @@ template class SListIterator { public: - typedef typename Tr::CppType CppType; - typedef typename Tr::CType CType; + typedef typename Tr::CppType CppType; + typedef typename Tr::CType CType; - typedef std::forward_iterator_tag iterator_category; - typedef CppType value_type; - typedef std::ptrdiff_t difference_type; - typedef value_type reference; - typedef void pointer; + typedef std::forward_iterator_tag iterator_category; + typedef CppType value_type; + typedef std::ptrdiff_t difference_type; + typedef value_type reference; + typedef void pointer; explicit inline SListIterator(const GSList* node); - inline value_type operator*() const; - inline SListIterator& operator++(); - inline const SListIterator operator++(int); + inline value_type operator*() const; + inline SListIterator& operator++(); + inline const SListIterator operator++(int); inline bool operator==(const SListIterator& rhs) const; inline bool operator!=(const SListIterator& rhs) const; @@ -273,8 +275,8 @@ template class ArrayKeeper { public: - typedef typename Tr::CppType CppType; - typedef typename Tr::CType CType; + typedef typename Tr::CppType CppType; + typedef typename Tr::CType CType; /** Constructs an ArrayKeeper holding @a array of size @a array_size. * @a ownership tells what should be destroyed with keeper destruction: @@ -288,7 +290,8 @@ public: * @param array_size - length of @a array. * @param ownership - ownership definition. */ - explicit inline ArrayKeeper(const CType* array, std::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() noexcept; @@ -332,8 +335,8 @@ template class GListKeeper { public: - typedef typename Tr::CppType CppType; - typedef typename Tr::CType CType; + typedef typename Tr::CppType CppType; + typedef typename Tr::CType CType; /** Constructs an GListKeeper holding @a glist. * @a ownership tells what should be destroyed with keeper destruction: @@ -389,8 +392,8 @@ template class GSListKeeper { public: - typedef typename Tr::CppType CppType; - typedef typename Tr::CType CType; + typedef typename Tr::CppType CppType; + typedef typename Tr::CType CType; /** Constructs an GSListKeeper holding @a gslist. * @a ownership tells what should be destroyed with keeper destruction: @@ -432,19 +435,23 @@ private: * @code * std::vector PixbufFormat::get_mime_types() const * { - * return Glib::ArrayHandler::array_to_vector(gdk_pixbuf_format_get_mime_types(const_cast(gobj())), Glib::OWNERSHIP_DEEP); + * return + * Glib::ArrayHandler::array_to_vector(gdk_pixbuf_format_get_mime_types(const_cast(gobj())), + * Glib::OWNERSHIP_DEEP); * } * @endcode * or * @code - * void Display::store_clipboard(const Glib::RefPtr& clipboard_window, guint32 time_, const std::vector& targets) + * void Display::store_clipboard(const Glib::RefPtr& clipboard_window, guint32 time_, + * const std::vector& targets) * { * if (!targets.size ()) * { * gdk_display_store_clipboard(gobj(), * Glib::unwrap (clipboard_window), * time_, - * Glib::ArrayHandler::vector_to_array(targets).data (), + * Glib::ArrayHandler::vector_to_array(targets).data (), * targets.size ()); * } * } @@ -456,7 +463,7 @@ private: * const char** array = Glib::ArrayHandler::vector_to_array(vec).data (); * @endcode */ -template > +template > class ArrayHandler { public: @@ -466,8 +473,9 @@ public: typedef typename Glib::Container_Helpers::ArrayKeeper ArrayKeeperType; typedef typename Glib::Container_Helpers::ArrayIterator ArrayIteratorType; -// maybe think about using C++0x move constructors? - static VectorType array_to_vector(const CType* array, std::size_t array_size, Glib::OwnershipType ownership); + // maybe think about using C++0x move constructors? + 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); }; @@ -479,11 +487,14 @@ public: typedef gboolean CType; typedef bool CppType; typedef std::vector VectorType; - typedef Glib::Container_Helpers::ArrayKeeper > ArrayKeeperType; - typedef Glib::Container_Helpers::ArrayIterator > ArrayIteratorType; - -// maybe think about using C++0x move constructors? - static VectorType array_to_vector(const CType* array, std::size_t array_size, Glib::OwnershipType ownership); + typedef Glib::Container_Helpers::ArrayKeeper> + ArrayKeeperType; + typedef Glib::Container_Helpers::ArrayIterator> + ArrayIteratorType; + + // maybe think about using C++0x move constructors? + 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); }; @@ -496,14 +507,16 @@ public: * @code * std::vector< Glib::RefPtr > Window::get_children() * { - * return Glib::ListHandler >::list_to_vector(gdk_window_get_children(gobj()), Glib::OWNERSHIP_SHALLOW); + * return Glib::ListHandler + * >::list_to_vector(gdk_window_get_children(gobj()), Glib::OWNERSHIP_SHALLOW); * } * @endcode * or * @code * void Window::set_icon_list(const std::vector< Glib::RefPtr >& pixbufs) * { - * gdk_window_set_icon_list(gobj(), Glib::ListHandler >::vector_to_list(pixbufs).data ()); + * gdk_window_set_icon_list(gobj(), Glib::ListHandler + * >::vector_to_list(pixbufs).data ()); * } * @endcode * Note that usage below is wrong - data() returns a pointer to data owned by @@ -513,7 +526,7 @@ public: * GList* glist = Glib::ListHandler >::vector_to_list(pixbufs).data(); * @endcode */ -template > +template > class ListHandler { public: @@ -523,7 +536,7 @@ public: typedef typename Glib::Container_Helpers::GListKeeper GListKeeperType; typedef typename Glib::Container_Helpers::ListIterator ListIteratorType; -// maybe think about using C++0x move constructors? + // maybe think about using C++0x move constructors? static VectorType list_to_vector(GList* glist, Glib::OwnershipType ownership); static GListKeeperType vector_to_list(const VectorType& vector); }; @@ -536,7 +549,8 @@ public: * @code * std::vector< Glib::RefPtr > DisplayManager::list_displays() * { - * return Glib::SListHandler >::slist_to_vector(gdk_display_manager_list_displays(gobj()), Glib::OWNERSHIP_SHALLOW); + * return Glib::SListHandler + * >::slist_to_vector(gdk_display_manager_list_displays(gobj()), Glib::OWNERSHIP_SHALLOW); * } * @endcode * or @@ -553,7 +567,7 @@ public: * GSList* gslist = Glib::SListHandler< Glib::RefPtr >::vector_to_slist(vec).data(); * @endcode */ -template > +template > class SListHandler { public: @@ -563,7 +577,7 @@ public: typedef typename Glib::Container_Helpers::GSListKeeper GSListKeeperType; typedef typename Glib::Container_Helpers::SListIterator SListIteratorType; -// maybe think about using C++0x move constructors? + // maybe think about using C++0x move constructors? static VectorType slist_to_vector(GSList* gslist, Glib::OwnershipType ownership); static GSListKeeperType vector_to_slist(const VectorType& vector); }; @@ -579,209 +593,212 @@ namespace Container_Helpers /**** Glib::Container_Helpers::ArrayIterator<> ***********************/ -template inline -ArrayIterator::ArrayIterator(const CType* pos) -: - pos_(pos) -{} +template +inline ArrayIterator::ArrayIterator(const CType* pos) : pos_(pos) +{ +} -template inline -typename ArrayIterator::value_type ArrayIterator::operator*() const +template +inline typename ArrayIterator::value_type ArrayIterator::operator*() const { return Tr::to_cpp_type(*pos_); } -template inline -typename ArrayIterator::value_type -ArrayIterator::operator[](difference_type offset) const +template +inline + typename ArrayIterator::value_type ArrayIterator::operator[](difference_type offset) const { return Tr::to_cpp_type(pos_[offset]); } -template inline -ArrayIterator& ArrayIterator::operator++() +template +inline ArrayIterator& ArrayIterator::operator++() { ++pos_; return *this; } -template inline -const ArrayIterator ArrayIterator::operator++(int) +template +inline const ArrayIterator ArrayIterator::operator++(int) { return ArrayIterator(pos_++); } -template inline -ArrayIterator& +template +inline ArrayIterator& ArrayIterator::operator+=(typename ArrayIterator::difference_type rhs) { pos_ += rhs; return *this; } -template inline -ArrayIterator& +template +inline ArrayIterator& ArrayIterator::operator-=(typename ArrayIterator::difference_type rhs) { pos_ -= rhs; return *this; } -template inline -const ArrayIterator +template +inline const ArrayIterator ArrayIterator::operator+(typename ArrayIterator::difference_type rhs) const { return ArrayIterator(pos_ + rhs); } -template inline -const ArrayIterator +template +inline const ArrayIterator ArrayIterator::operator-(typename ArrayIterator::difference_type rhs) const { return ArrayIterator(pos_ - rhs); } -template inline -typename ArrayIterator::difference_type +template +inline typename ArrayIterator::difference_type ArrayIterator::operator-(const ArrayIterator& rhs) const { - return(pos_ - rhs.pos_); + return (pos_ - rhs.pos_); } -template inline -bool ArrayIterator::operator==(const ArrayIterator& rhs) const +template +inline bool +ArrayIterator::operator==(const ArrayIterator& rhs) const { - return(pos_ == rhs.pos_); + return (pos_ == rhs.pos_); } -template inline -bool ArrayIterator::operator!=(const ArrayIterator& rhs) const +template +inline bool +ArrayIterator::operator!=(const ArrayIterator& rhs) const { - return(pos_ != rhs.pos_); + return (pos_ != rhs.pos_); } -template inline -bool ArrayIterator::operator<(const ArrayIterator& rhs) const +template +inline bool +ArrayIterator::operator<(const ArrayIterator& rhs) const { - return(pos_ < rhs.pos_); + return (pos_ < rhs.pos_); } -template inline -bool ArrayIterator::operator>(const ArrayIterator& rhs) const +template +inline bool +ArrayIterator::operator>(const ArrayIterator& rhs) const { - return(pos_ > rhs.pos_); + return (pos_ > rhs.pos_); } -template inline -bool ArrayIterator::operator<=(const ArrayIterator& rhs) const +template +inline bool +ArrayIterator::operator<=(const ArrayIterator& rhs) const { - return(pos_ <= rhs.pos_); + return (pos_ <= rhs.pos_); } -template inline -bool ArrayIterator::operator>=(const ArrayIterator& rhs) const +template +inline bool +ArrayIterator::operator>=(const ArrayIterator& rhs) const { - return(pos_ >= rhs.pos_); + return (pos_ >= rhs.pos_); } /**** Glib::Container_Helpers::ListIterator<> ************************/ -template inline -ListIterator::ListIterator(const GList* node) -: - node_(node) -{} +template +inline ListIterator::ListIterator(const GList* node) : node_(node) +{ +} -template inline -typename ListIterator::value_type ListIterator::operator*() const +template +inline typename ListIterator::value_type ListIterator::operator*() const { return Tr::to_cpp_type(static_cast(node_->data)); } -template inline -ListIterator& ListIterator::operator++() +template +inline ListIterator& ListIterator::operator++() { node_ = node_->next; return *this; } -template inline -const ListIterator ListIterator::operator++(int) +template +inline const ListIterator ListIterator::operator++(int) { const ListIterator tmp(*this); node_ = node_->next; return tmp; } -template inline -bool ListIterator::operator==(const ListIterator& rhs) const +template +inline bool +ListIterator::operator==(const ListIterator& rhs) const { - return(node_ == rhs.node_); + return (node_ == rhs.node_); } -template inline -bool ListIterator::operator!=(const ListIterator& rhs) const +template +inline bool +ListIterator::operator!=(const ListIterator& rhs) const { - return(node_ != rhs.node_); + return (node_ != rhs.node_); } /**** Glib::Container_Helpers::SListIterator<> ************************/ -template inline -SListIterator::SListIterator(const GSList* node) -: - node_(node) -{} +template +inline SListIterator::SListIterator(const GSList* node) : node_(node) +{ +} -template inline -typename SListIterator::value_type SListIterator::operator*() const +template +inline typename SListIterator::value_type SListIterator::operator*() const { return Tr::to_cpp_type(static_cast(node_->data)); } -template inline -SListIterator& SListIterator::operator++() +template +inline SListIterator& SListIterator::operator++() { node_ = node_->next; return *this; } -template inline -const SListIterator SListIterator::operator++(int) +template +inline const SListIterator SListIterator::operator++(int) { const ListIterator tmp(*this); node_ = node_->next; return tmp; } -template inline -bool SListIterator::operator==(const SListIterator& rhs) const +template +inline bool +SListIterator::operator==(const SListIterator& rhs) const { - return(node_ == rhs.node_); + return (node_ == rhs.node_); } -template inline -bool SListIterator::operator!=(const SListIterator& rhs) const +template +inline bool +SListIterator::operator!=(const SListIterator& rhs) const { - return(node_ != rhs.node_); + return (node_ != rhs.node_); } /**** Glib::Container_Helpers::ArrayKeeper<> ************************/ template -inline ArrayKeeper::ArrayKeeper(const CType* array, std::size_t array_size, Glib::OwnershipType ownership) -: - array_(const_cast(array)), - array_size_(array_size), - ownership_(ownership) -{} +inline ArrayKeeper::ArrayKeeper( + const CType* array, std::size_t array_size, Glib::OwnershipType ownership) +: array_(const_cast(array)), array_size_(array_size), ownership_(ownership) +{ +} template inline ArrayKeeper::ArrayKeeper(const ArrayKeeper& keeper) -: - array_(keeper.array_), - array_size_(keeper.array_size_), - ownership_(keeper.ownership_) +: array_(keeper.array_), array_size_(keeper.array_size_), ownership_(keeper.ownership_) { keeper.ownership_ = Glib::OWNERSHIP_NONE; } @@ -789,14 +806,14 @@ inline ArrayKeeper::ArrayKeeper(const ArrayKeeper& keeper) template ArrayKeeper::~ArrayKeeper() noexcept { - if(array_ && ownership_ != Glib::OWNERSHIP_NONE) + if (array_ && ownership_ != Glib::OWNERSHIP_NONE) { - if(ownership_ != Glib::OWNERSHIP_SHALLOW) + if (ownership_ != Glib::OWNERSHIP_SHALLOW) { // Deep ownership: release each container element. - const CType *const array_end(array_ + array_size_); + const CType* const array_end(array_ + array_size_); - for(const CType* p(array_); p != array_end; ++p) + for (const CType* p(array_); p != array_end; ++p) { Tr::release_c_type(*p); } @@ -806,7 +823,8 @@ ArrayKeeper::~ArrayKeeper() noexcept } template -inline typename Tr::CType* ArrayKeeper::data() const +inline typename Tr::CType* +ArrayKeeper::data() const { return array_; } @@ -815,16 +833,13 @@ inline typename Tr::CType* ArrayKeeper::data() const template inline GListKeeper::GListKeeper(const GList* glist, Glib::OwnershipType ownership) -: - glist_(const_cast(glist)), - ownership_(ownership) -{} +: glist_(const_cast(glist)), ownership_(ownership) +{ +} template inline GListKeeper::GListKeeper(const GListKeeper& keeper) -: - glist_(keeper.glist_), - ownership_(keeper.ownership_) +: glist_(keeper.glist_), ownership_(keeper.ownership_) { keeper.ownership_ = Glib::OWNERSHIP_NONE; } @@ -834,12 +849,12 @@ GListKeeper::~GListKeeper() noexcept { typedef typename Tr::CTypeNonConst CTypeNonConst; - if(glist_ && ownership_ != Glib::OWNERSHIP_NONE) + if (glist_ && ownership_ != Glib::OWNERSHIP_NONE) { - if(ownership_ != Glib::OWNERSHIP_SHALLOW) + if (ownership_ != Glib::OWNERSHIP_SHALLOW) { // Deep ownership: release each container element. - for(GList* node = glist_; node; node = node->next) + for (GList* node = glist_; node; node = node->next) { Tr::release_c_type(static_cast(node->data)); } @@ -849,7 +864,8 @@ GListKeeper::~GListKeeper() noexcept } template -inline GList* GListKeeper::data() const +inline GList* +GListKeeper::data() const { return glist_; } @@ -858,16 +874,13 @@ inline GList* GListKeeper::data() const template inline GSListKeeper::GSListKeeper(const GSList* gslist, Glib::OwnershipType ownership) -: - gslist_(const_cast(gslist)), - ownership_(ownership) -{} +: gslist_(const_cast(gslist)), ownership_(ownership) +{ +} template inline GSListKeeper::GSListKeeper(const GSListKeeper& keeper) -: - gslist_(keeper.gslist_), - ownership_(keeper.ownership_) +: gslist_(keeper.gslist_), ownership_(keeper.ownership_) { keeper.ownership_ = Glib::OWNERSHIP_NONE; } @@ -876,12 +889,12 @@ template GSListKeeper::~GSListKeeper() noexcept { typedef typename Tr::CTypeNonConst CTypeNonConst; - if(gslist_ && ownership_ != Glib::OWNERSHIP_NONE) + if (gslist_ && ownership_ != Glib::OWNERSHIP_NONE) { - if(ownership_ != Glib::OWNERSHIP_SHALLOW) + if (ownership_ != Glib::OWNERSHIP_SHALLOW) { // Deep ownership: release each container element. - for(GSList* node = gslist_; node; node = node->next) + for (GSList* node = gslist_; node; node = node->next) { Tr::release_c_type(static_cast(node->data)); } @@ -891,7 +904,8 @@ GSListKeeper::~GSListKeeper() noexcept } template -inline GSList* GSListKeeper::data() const +inline GSList* +GSListKeeper::data() const { return gslist_; } @@ -902,7 +916,8 @@ inline GSList* GSListKeeper::data() const template typename ArrayHandler::VectorType -ArrayHandler::array_to_vector(const CType* array, std::size_t array_size, Glib::OwnershipType ownership) +ArrayHandler::array_to_vector( + const CType* array, std::size_t array_size, Glib::OwnershipType ownership) { if (array) { @@ -913,7 +928,8 @@ ArrayHandler::array_to_vector(const CType* array, std::size_t array_size, #else VectorType temp; temp.reserve(array_size); - Glib::Container_Helpers::fill_container(temp, ArrayIteratorType(array), ArrayIteratorType(array + array_size)); + Glib::Container_Helpers::fill_container( + temp, ArrayIteratorType(array), ArrayIteratorType(array + array_size)); return temp; #endif } @@ -931,7 +947,8 @@ template typename ArrayHandler::ArrayKeeperType ArrayHandler::vector_to_array(const VectorType& vector) { - return ArrayKeeperType(Glib::Container_Helpers::create_array(vector.begin(), vector.size()), vector.size(), Glib::OWNERSHIP_SHALLOW); + return ArrayKeeperType(Glib::Container_Helpers::create_array(vector.begin(), vector.size()), + vector.size(), Glib::OWNERSHIP_SHALLOW); } /**** Glib::ListHandler<> ************************/ @@ -956,7 +973,8 @@ template typename ListHandler::GListKeeperType ListHandler::vector_to_list(const VectorType& vector) { - return GListKeeperType(Glib::Container_Helpers::create_glist(vector.begin(), vector.end()), Glib::OWNERSHIP_SHALLOW); + return GListKeeperType(Glib::Container_Helpers::create_glist(vector.begin(), vector.end()), + Glib::OWNERSHIP_SHALLOW); } /**** Glib::SListHandler<> ************************/ @@ -972,7 +990,8 @@ SListHandler::slist_to_vector(GSList* gslist, Glib::OwnershipType ownersh #else VectorType temp; temp.reserve(g_slist_length(gslist)); - Glib::Container_Helpers::fill_container(temp, SListIteratorType(gslist), SListIteratorType(nullptr)); + Glib::Container_Helpers::fill_container( + temp, SListIteratorType(gslist), SListIteratorType(nullptr)); return temp; #endif } @@ -981,12 +1000,12 @@ template typename SListHandler::GSListKeeperType SListHandler::vector_to_slist(const VectorType& vector) { - return GSListKeeperType(Glib::Container_Helpers::create_gslist(vector.begin(), vector.end()), Glib::OWNERSHIP_SHALLOW); + return GSListKeeperType(Glib::Container_Helpers::create_gslist(vector.begin(), vector.end()), + Glib::OWNERSHIP_SHALLOW); } #endif /* DOXYGEN_SHOULD_SKIP_THIS */ } // namespace Glib - #endif /* _GLIBMM_VECTORUTILS_H */ -- cgit v1.2.1