]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
- don't use factory
authorArvin Schnell <aschnell@suse.de>
Tue, 14 Aug 2012 12:24:17 +0000 (14:24 +0200)
committerArvin Schnell <aschnell@suse.de>
Tue, 14 Aug 2012 12:24:17 +0000 (14:24 +0200)
examples/Create.cc
examples/CreateTimeline.cc
examples/List.cc
examples/ListAll.cc
examples/SnapTest.cc

index b509c37d3800ff7cc43fb6775e417d0bb57c5348..4a2a4a36e4d7ea35d9b178d0bab38c4ac1e2cd4b 100644 (file)
@@ -2,7 +2,6 @@
 #include <stdlib.h>
 #include <iostream>
 
-#include <snapper/Factory.h>
 #include <snapper/Snapper.h>
 
 using namespace snapper;
@@ -11,9 +10,11 @@ using namespace std;
 int
 main(int argc, char** argv)
 {
-    Snapper* sh = createSnapper();
+    Snapper* sh = new Snapper();
 
     sh->createSingleSnapshot("test");
 
+    delete sh;
+
     exit(EXIT_SUCCESS);
 }
index 468d96293523bdc0faa2c6792373593758ffaaf8..d811710f2783ecc7cc7886b923d9d4523ce7127e 100644 (file)
@@ -3,7 +3,6 @@
 #include <vector>
 #include <iostream>
 
-#include <snapper/Factory.h>
 #include <snapper/Snapper.h>
 
 using namespace snapper;
@@ -13,7 +12,7 @@ using namespace std;
 void
 deleteAll()
 {
-    Snapper* sh = createSnapper("testsuite");
+    Snapper* sh = new Snapper("testsuite");
 
     Snapshots snapshots = sh->getSnapshots();
 
@@ -25,7 +24,7 @@ deleteAll()
     for (vector<Snapshots::iterator>::iterator it = tmp.begin(); it != tmp.end(); ++it)
        sh->deleteSnapshot(*it);
 
-    deleteSnapper(sh);
+    delete sh;
 }
 
 
@@ -34,7 +33,7 @@ main()
 {
     deleteAll();
 
-    Snapper* sh = createSnapper("testsuite");
+    Snapper* sh = new Snapper("testsuite");
 
     time_t t = time(NULL) - 100 * 24*60*60;
     while (t < time(NULL))
@@ -46,7 +45,7 @@ main()
        t += 60*60;
     }
 
-    deleteSnapper(sh);
+    delete sh;
 
     exit(EXIT_SUCCESS);
 }
index cbc8d758ff4eb0d08caac91e9f71b23e87bebc7a..58999ee7b36c1c347bbf47a42a9b4dc367605771 100644 (file)
@@ -2,7 +2,6 @@
 #include <stdlib.h>
 #include <iostream>
 
-#include <snapper/Factory.h>
 #include <snapper/Snapper.h>
 
 using namespace snapper;
@@ -11,7 +10,7 @@ using namespace std;
 int
 main(int argc, char** argv)
 {
-    Snapper* sh = createSnapper();
+    Snapper* sh = new Snapper();
 
     const Snapshots& snapshots = sh->getSnapshots();
     for (Snapshots::const_iterator it = snapshots.begin(); it != snapshots.end(); ++it)
@@ -19,5 +18,7 @@ main(int argc, char** argv)
        cout << *it << endl;
     }
 
+    delete sh;
+
     exit(EXIT_SUCCESS);
 }
index 140bb74f33253c022f383e66151bb3140b8ff037..ac04419fc83e3e70597c75c6b7dbe5e77e882245 100644 (file)
@@ -2,7 +2,6 @@
 #include <stdlib.h>
 #include <iostream>
 
-#include <snapper/Factory.h>
 #include <snapper/Snapper.h>
 
 using namespace snapper;
index bc470cc69f924ea911467d8f952ef11e874a55da..4cfa2e09c36566a9e6580cd2fecbed9afc640cb2 100644 (file)
@@ -2,7 +2,6 @@
 #include <stdlib.h>
 #include <iostream>
 
-#include <snapper/Factory.h>
 #include <snapper/Snapper.h>
 #include <snapper/Comparison.h>
 #include <snapper/File.h>