diff options
author | Dan Goodliffe <daniel.goodliffe@pressassociation.com> | 2015-02-16 17:10:48 +0000 |
---|---|---|
committer | Dan Goodliffe <daniel.goodliffe@pressassociation.com> | 2015-02-16 17:10:48 +0000 |
commit | b95c6f132dcd1a1ba6222fe95e5e4bbaa97f4223 (patch) | |
tree | abffd68e54deda213861236436d7ab21147462c4 | |
parent | Export the runint function (diff) | |
download | netfs-b95c6f132dcd1a1ba6222fe95e5e4bbaa97f4223.tar.bz2 netfs-b95c6f132dcd1a1ba6222fe95e5e4bbaa97f4223.tar.xz netfs-b95c6f132dcd1a1ba6222fe95e5e4bbaa97f4223.zip |
runint doesn't need a pointer to itself passing in
-rw-r--r-- | libfusepp/fuseAppBase.cpp | 4 | ||||
-rw-r--r-- | libfusepp/fuseAppBase.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/libfusepp/fuseAppBase.cpp b/libfusepp/fuseAppBase.cpp index 4d9ca97..4e34192 100644 --- a/libfusepp/fuseAppBase.cpp +++ b/libfusepp/fuseAppBase.cpp @@ -198,12 +198,12 @@ void FuseAppBase::fuseDestroy(void *) } struct fuse_args -FuseAppBase::runint(int & argc, char** & argv, FuseAppBase * fa) +FuseAppBase::runint(int & argc, char** & argv) { struct fuse_opt fuse_opts[] = { { NULL, 0, 0 } }; - fuseApp = fa; + fuseApp = this; struct fuse_args args = FUSE_ARGS_INIT(argc, argv); if (fuse_opt_parse(&args, fuseApp, fuse_opts, fuseCall<void *, const char *, int, struct fuse_args *>::helper<&FuseAppBase::opt_parse>) == -1) { diff --git a/libfusepp/fuseAppBase.h b/libfusepp/fuseAppBase.h index 4b56f2f..73a809a 100644 --- a/libfusepp/fuseAppBase.h +++ b/libfusepp/fuseAppBase.h @@ -62,7 +62,7 @@ class FuseAppBase { template <typename FuseApp> static int run(int & argc, char** & argv, FuseApp * fa) { - auto args = fa->runint(argc, argv, fa); + auto args = fa->runint(argc, argv); struct fuse_operations operations = { fuseCall<const char *, struct stat *>::GetHelper(getattr), fuseCall<const char *, char *, size_t>::GetHelper(readlink), @@ -123,7 +123,7 @@ class FuseAppBase { }; return fuse_main(args.argc, args.argv, &operations, fa); } - struct fuse_args runint(int &, char ** &, FuseAppBase *); + struct fuse_args runint(int &, char ** &); private: static void * fuseInit(struct fuse_conn_info *conn); |