X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/d7a51997c30b2098bb60b3397095ec58ec825303..4c482ac554e1b533d98661de8585d5861d9ac562:/methods/rred.cc diff --git a/methods/rred.cc b/methods/rred.cc index 7c2ccd98e..bb801cb4e 100644 --- a/methods/rred.cc +++ b/methods/rred.cc @@ -13,6 +13,7 @@ #include #include #include +#include "aptmethod.h" #include #include @@ -38,7 +39,7 @@ class MemBlock { char *free; MemBlock *next; - MemBlock(size_t size) : size(size), next(NULL) + explicit MemBlock(size_t size) : size(size), next(NULL) { free = start = new char[size]; } @@ -117,7 +118,7 @@ struct Change { size_t add_len; /* bytes */ char *add; - Change(size_t off) + explicit Change(size_t off) { offset = off; del_cnt = add_cnt = add_len = 0; @@ -532,7 +533,7 @@ class Patch { } }; -class RredMethod : public pkgAcqMethod { +class RredMethod : public aptMethod { private: bool Debug; @@ -621,7 +622,7 @@ class RredMethod : public pkgAcqMethod { if (p.Open(patch_name, FileFd::ReadOnly, FileFd::Gzip) == false || patch.read_diff(p, &patch_hash) == false) { - _error->DumpErrors(std::cerr); + _error->DumpErrors(std::cerr, GlobalError::DEBUG, false); return false; } p.Close(); @@ -680,18 +681,8 @@ class RredMethod : public pkgAcqMethod { return true; } - bool Configuration(std::string Message) APT_OVERRIDE - { - if (pkgAcqMethod::Configuration(Message) == false) - return false; - - DropPrivsOrDie(); - - return true; - } - public: - RredMethod() : pkgAcqMethod("2.0",SingleInstance | SendConfig), Debug(false) {} + RredMethod() : aptMethod("rred", "2.0",SingleInstance | SendConfig), Debug(false) {} }; int main(int argc, char **argv)