Skip to content

Commit

Permalink
[Linux] Convert possible glib objects to GAutoPtr (#29340)
Browse files Browse the repository at this point in the history
* Replace glib GError with GAutoPtr<GError> in AdapterIterator

* Replace glib GError with GAutoPtr<GError> in ChipDeviceScanner

* Replace glib GError with GAutoPtr<GError> in Bluez helper

* Replace glib GError with GAutoPtr<GError> in ConnectivityMangaerImpl

* Replace glib GVariant with GAutoPtr<GVariant> in ConnectivityManagerImpl

* Replace glib GVariant with GAutoPtr<GVariant> in Bluez helper

* Replace glib and char with GAutoPtr<char> in Bluez helper

* Replace glib and GVariantDict with GAutoPtr<GVariantDict> in Bluez helper - review

* Fix badly used MakeUniquePointerReceiver

* Review changes

* Replace g_variant_dict_lookup_value to g_variant_lookup_value in src/platform/Linux/bluez/Helper.cpp
* Add template <> struct GAutoPtrDeleter<const char *>
* Convert keyMgmts to GAutoPtr in src/platform/Linux/ConnectivityManagerImpl.cpp
* Revert in ConnectionDataBundle GVariant convert to GAutoPtr

* Review update - remove GVariantDict

* Add errorhandling for keyMgmtsHendle
  • Loading branch information
DamMicSzm authored and pull[bot] committed Oct 19, 2023
1 parent 680a69c commit 1633618
Show file tree
Hide file tree
Showing 6 changed files with 157 additions and 243 deletions.
6 changes: 6 additions & 0 deletions src/platform/GLibTypeDeleter.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ struct GAutoPtrDeleter<char>
using deleter = GFree;
};

template <>
struct GAutoPtrDeleter<const char *>
{
using deleter = GFree;
};

template <>
struct GAutoPtrDeleter<GBytes>
{
Expand Down
Loading

0 comments on commit 1633618

Please sign in to comment.