blob: 58f40dafa739f906700f5837f91fea645c780f17 [file] [log] [blame]
Lei Zhangb6992dd2019-02-05 23:30:20 +00001// Copyright 2019 PDFium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef TESTING_FREE_DELETER_H_
6#define TESTING_FREE_DELETER_H_
7
8#include <stdlib.h>
9
10namespace pdfium {
11
12// Used with std::unique_ptr to free() objects that can't be deleted.
13struct FreeDeleter {
14 inline void operator()(void* ptr) const { free(ptr); }
15};
16
17} // namespace pdfium
18
19#endif // TESTING_FREE_DELETER_H_