Blender V4.3
GHOST_Util.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2002-2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
9#pragma once
10
11#include <functional>
12
18 using FreeFn = std::function<void(void *)>;
19
22
23 GHOST_C_CustomDataWrapper(void *custom_data, FreeFn free_fn)
24 : custom_data_(custom_data), free_fn_(free_fn)
25 {
26 }
28 {
29 if (free_fn_ != nullptr && custom_data_ != nullptr) {
31 }
32 }
33};
std::function< void(void *)> FreeFn
Definition GHOST_Util.hh:18
GHOST_C_CustomDataWrapper(void *custom_data, FreeFn free_fn)
Definition GHOST_Util.hh:23