You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
446 B
21 lines
446 B
#ifndef ANDROID_DVR_PERFORMANCED_UNIQUE_FILE_H_
|
|
#define ANDROID_DVR_PERFORMANCED_UNIQUE_FILE_H_
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <memory>
|
|
|
|
namespace android {
|
|
namespace dvr {
|
|
|
|
// Utility to manage the lifetime of a file pointer.
|
|
struct FileDeleter {
|
|
void operator()(FILE* fp) { fclose(fp); }
|
|
};
|
|
using UniqueFile = std::unique_ptr<FILE, FileDeleter>;
|
|
|
|
} // namespace dvr
|
|
} // namespace android
|
|
|
|
#endif // ANDROID_DVR_PERFORMANCED_UNIQUE_FILE_H_
|