diff options
| author | Dan Goodliffe <dan@randomdan.homeip.net> | 2017-12-16 18:05:09 +0000 | 
|---|---|---|
| committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2017-12-16 19:48:24 +0000 | 
| commit | c28a40388b188221abc64de7f2ba52a7f4ffd448 (patch) | |
| tree | ae2d93665e6d505847ec27acc8eeda6fa8eae7a7 | |
| parent | Greatly simplify the mess of fuse_operations initialisation and remove the no... (diff) | |
| download | netfs-c28a40388b188221abc64de7f2ba52a7f4ffd448.tar.bz2 netfs-c28a40388b188221abc64de7f2ba52a7f4ffd448.tar.xz netfs-c28a40388b188221abc64de7f2ba52a7f4ffd448.zip  | |
Provide an internal helper for calling member functions via libfuse
| -rw-r--r-- | netfs/fuse/fuseAppBase.cpp | 2 | ||||
| -rw-r--r-- | netfs/fuse/fuseAppBase.h | 5 | 
2 files changed, 6 insertions, 1 deletions
diff --git a/netfs/fuse/fuseAppBase.cpp b/netfs/fuse/fuseAppBase.cpp index fc6fa14..f0d6b52 100644 --- a/netfs/fuse/fuseAppBase.cpp +++ b/netfs/fuse/fuseAppBase.cpp @@ -224,7 +224,7 @@ FuseAppBase::runint(int argc, char ** argv)  	fuseApp = this;  	struct fuse_args args = FUSE_ARGS_INIT(argc, argv);  	if (fuse_opt_parse(&args, fuseApp, fuse_opts, -			&helper<decltype(&FuseAppBase::opt_parse), &FuseAppBase::opt_parse>) == -1) { +			&internalHelper<decltype(&FuseAppBase::opt_parse), &FuseAppBase::opt_parse>) == -1) {  		exit(1);  	}  	return args; diff --git a/netfs/fuse/fuseAppBase.h b/netfs/fuse/fuseAppBase.h index 4128c6b..daa8cb1 100644 --- a/netfs/fuse/fuseAppBase.h +++ b/netfs/fuse/fuseAppBase.h @@ -170,6 +170,11 @@ class DLL_PUBLIC FuseAppBase {  				}  			}  		} +		template <typename Func, Func f, typename ... Args> +		static int internalHelper(Args ... a) +		{ +			return (fuseApp->*f)(a...); +		}  		static FuseAppBase * fuseApp;  };  | 
