From e8afd16892e87a6e2f17c1019ee455f5583387c2 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 17 Jun 2015 00:14:10 +0200 Subject: apply various style suggestions by cppcheck Some of them modify the ABI, but given that we prepare a big one already, these few hardly count for much. Git-Dch: Ignore --- apt-pkg/srcrecords.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'apt-pkg/srcrecords.cc') diff --git a/apt-pkg/srcrecords.cc b/apt-pkg/srcrecords.cc index 3175ee75f..bbab9d796 100644 --- a/apt-pkg/srcrecords.cc +++ b/apt-pkg/srcrecords.cc @@ -178,3 +178,7 @@ bool pkgSrcRecords::Parser::Files2(std::vector &F2)/*{{{*/ return true; } /*}}}*/ + + +pkgSrcRecords::Parser::Parser(const pkgIndexFile *Index) : iIndex(Index) {} +pkgSrcRecords::Parser::~Parser() {} -- cgit v1.2.3 From 6c55f07a5fa3612a5d59c61a17da5fe640eadc8b Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 17 Jun 2015 09:29:00 +0200 Subject: make all d-pointer * const pointers Doing this disables the implicit copy assignment operator (among others) which would cause hovac if used on the classes as it would just copy the pointer, not the data the d-pointer points to. For most of the classes we don't need a copy assignment operator anyway and in many classes it was broken before as many contain a pointer of some sort. Only for our Cacheset Container interfaces we define an explicit copy assignment operator which could later be implemented to copy the data from one d-pointer to the other if we need it. Git-Dch: Ignore --- apt-pkg/srcrecords.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg/srcrecords.cc') diff --git a/apt-pkg/srcrecords.cc b/apt-pkg/srcrecords.cc index bbab9d796..e3ffa9ab0 100644 --- a/apt-pkg/srcrecords.cc +++ b/apt-pkg/srcrecords.cc @@ -180,5 +180,5 @@ bool pkgSrcRecords::Parser::Files2(std::vector &F2)/*{{{*/ /*}}}*/ -pkgSrcRecords::Parser::Parser(const pkgIndexFile *Index) : iIndex(Index) {} +pkgSrcRecords::Parser::Parser(const pkgIndexFile *Index) : d(NULL), iIndex(Index) {} pkgSrcRecords::Parser::~Parser() {} -- cgit v1.2.3 From f8043f219f077b1cfc6c5ad2263c4caa4709a00d Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 14 Aug 2015 19:44:25 +0200 Subject: Make apt compile with clang++ again This allows us to run the clang static analyzer and to run the testsuite with the clang MemorySanitizer. --- apt-pkg/srcrecords.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg/srcrecords.cc') diff --git a/apt-pkg/srcrecords.cc b/apt-pkg/srcrecords.cc index e3ffa9ab0..942f11569 100644 --- a/apt-pkg/srcrecords.cc +++ b/apt-pkg/srcrecords.cc @@ -31,7 +31,7 @@ // SrcRecords::pkgSrcRecords - Constructor /*{{{*/ // --------------------------------------------------------------------- /* Open all the source index files */ -pkgSrcRecords::pkgSrcRecords(pkgSourceList &List) : d(NULL), Files(0), Current(0) +pkgSrcRecords::pkgSrcRecords(pkgSourceList &List) : d(NULL), Files(0) { for (pkgSourceList::const_iterator I = List.begin(); I != List.end(); ++I) { -- cgit v1.2.3