File: memory.h

package info (click to toggle)
kio-extras 4%3A25.04.2-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 31,928 kB
  • sloc: cpp: 28,852; ansic: 3,084; perl: 1,048; xml: 116; sh: 92; python: 28; makefile: 9
file content (20 lines) | stat: -rw-r--r-- 498 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
// SPDX-FileCopyrightText: 2022 Harald Sitter <sitter@kde.org>

#pragma once

#include <libmtp.h>

#include <memory>

namespace std
{
// Add a default deleter for LIBMTP_file_t. Means we do not have to repeat the deleter all over the place.
template<>
struct default_delete<LIBMTP_file_t> {
    void operator()(LIBMTP_file_t *ptr) const
    {
        LIBMTP_destroy_file_t(ptr);
    }
};
} // namespace std