]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
- use C++11 lambda
authorArvin Schnell <aschnell@suse.de>
Wed, 18 Feb 2015 11:28:36 +0000 (12:28 +0100)
committerArvin Schnell <aschnell@suse.de>
Wed, 18 Feb 2015 11:28:36 +0000 (12:28 +0100)
snapper/Comparison.cc

index ffb0defdf7229ac42ab7fa54d57f91edcdfa1aab..bca9c2e2a3ec21122b2d290a6e035ee2989e584e 100644 (file)
@@ -101,17 +101,6 @@ namespace snapper
     }
 
 
-    struct Comparison::AppendHelper
-    {
-       AppendHelper(const FilePaths* file_paths, Files& files)
-           : file_paths(file_paths), files(files) {}
-       void operator()(const string& name, unsigned int status)
-           { files.push_back(File(file_paths, name, status)); }
-       const FilePaths* file_paths;
-       Files& files;
-    };
-
-
     void
     Comparison::mount() const
     {
@@ -137,13 +126,9 @@ namespace snapper
     {
        y2mil("num1:" << getSnapshot1()->getNum() << " num2:" << getSnapshot2()->getNum());
 
-#if 1
-       cmpdirs_cb_t cb = AppendHelper(&file_paths, files);
-#else
-       cmpdirs_cb_t cb = [&file_paths, &files](const string& name, unsigned int status) {
+       cmpdirs_cb_t cb = [this](const string& name, unsigned int status) {
            files.push_back(File(&file_paths, name, status));
        };
-#endif
 
        mount();