]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/contrib/error.cc
This is realloc, not reallocf: be more careful :/.
[apt.git] / apt-pkg / contrib / error.cc
index c06ea8364992f3ebf8a4c52d7b0b2119d49b43f8..7d397d2c696b8de2610fccc5f1dc335fdfcdb527 100644 (file)
@@ -227,6 +227,15 @@ void GlobalError::Discard() {
        PendingFlag = false;
 }
                                                                        /*}}}*/
+// GlobalError::ReturnError - convert a stored error to a return code          /*{{{*/
+bool GlobalError::ReturnError() {
+       for (auto &message : Messages)
+               if (message.Type == ERROR)
+                       message.Type = WARNING;
+       PendingFlag = false;
+       return false;
+}
+                                                                       /*}}}*/
 // GlobalError::empty - does our error list include anything?          /*{{{*/
 bool GlobalError::empty(MsgType const &threshold) const {
        if (PendingFlag == true)