Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=cfpm.git;a=commitdiff;h=9d22c66bbca416b06f9d47c9ba7da6542ea9d75d

commit 9d22c66bbca416b06f9d47c9ba7da6542ea9d75d
Author: Priyank <priy...@frugalware.org>
Date:   Fri Jun 5 14:45:32 2009 +0530

use static object

diff --git a/main.cc b/main.cc
index 4f7a0dd..ee031d1 100644
--- a/main.cc
+++ b/main.cc
@@ -10,8 +10,8 @@ using std::string;

int main(int argc,char **argv)
{
-       Args args;
-       Database *db;
+       Args            args;
+       Database        db;

//if( !args.parseArgs(argc,argv) )
//      return 1;
@@ -21,14 +21,13 @@ int main(int argc,char **argv)
cerr<<"Error initializing libpacman"<<endl;

/* register a new database */
-       db = new Database;
-       if ( db->registerDb("local") )
+       if ( db.registerDb("local") )
cout<<"database registered"<<endl;
else
-               db->printStatus();
-
+               db.printStatus();
+
/* unregister database */
-       db->unregisterDb();
+       db.unregisterDb();

/* release libpacman */
release();
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to