summaryrefslogtreecommitdiff
path: root/jni/node-inl.h
diff options
context:
space:
mode:
Diffstat (limited to 'jni/node-inl.h')
-rw-r--r--jni/node-inl.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/jni/node-inl.h b/jni/node-inl.h
index 5db14134e..487583cea 100644
--- a/jni/node-inl.h
+++ b/jni/node-inl.h
@@ -34,17 +34,21 @@ namespace mediaprovider {
namespace fuse {
struct handle {
- explicit handle(const std::string& path) : path(path), fd(-1), ri(nullptr), cached(true){};
+ explicit handle(const std::string& path, int fd, const RedactionInfo* ri, bool cached)
+ : path(path), fd(fd), ri(ri), cached(cached) {
+ CHECK(ri != nullptr);
+ }
+
const std::string path;
- int fd;
- std::unique_ptr<RedactionInfo> ri;
- bool cached;
+ const int fd;
+ const std::unique_ptr<const RedactionInfo> ri;
+ const bool cached;
~handle() { close(fd); }
};
struct dirhandle {
- explicit dirhandle(DIR* dir) : d(dir), next_off(0){};
+ explicit dirhandle(DIR* dir) : d(dir), next_off(0) { CHECK(dir != nullptr); }
DIR* const d;
off_t next_off;