Warning, file /network/kio-extras/mtp/kiod_module/memory.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0002 // SPDX-FileCopyrightText: 2022 Harald Sitter <sitter@kde.org>
0003 
0004 #pragma once
0005 
0006 #include <libmtp.h>
0007 
0008 #include <memory>
0009 
0010 namespace std
0011 {
0012 // Add a default deleter for LIBMTP_file_t. Means we do not have to repeat the deleter all over the place.
0013 template<>
0014 struct default_delete<LIBMTP_file_t> {
0015     void operator()(LIBMTP_file_t *ptr) const
0016     {
0017         LIBMTP_destroy_file_t(ptr);
0018     }
0019 };
0020 } // namespace std