clean unneeded 'this->'
authorMichael Andres <ma@suse.de>
Fri, 16 May 2014 09:23:13 +0000 (11:23 +0200)
committerMichael Andres <ma@suse.de>
Fri, 16 May 2014 09:23:13 +0000 (11:23 +0200)
src/Zypper.cc
src/output/Out.cc
src/output/OutNormal.cc
src/output/OutXML.cc

index 6472c38..cc54d17 100644 (file)
@@ -2880,7 +2880,7 @@ void Zypper::doCommand()
 
     // needed to be able to retrieve target distribution
     init_target(*this);
-    this->_gopts.rm_options.servicesTargetDistro =
+    _gopts.rm_options.servicesTargetDistro =
       God->target()->targetDistribution();
 
     initRepoManager();
@@ -3208,15 +3208,15 @@ void Zypper::doCommand()
         if (copts.count("check"))
         {
           if (!copts.count("no-check"))
-            this->_gopts.rm_options.probe = true;
+            _gopts.rm_options.probe = true;
           else
-            this->out().warning(str::form(
+            out().warning(str::form(
               _("Cannot use %s together with %s. Using the %s setting."),
               "--check", "--no-check", "zypp.conf")
                 ,Out::QUIET);
         }
         else if (copts.count("no-check"))
-          this->_gopts.rm_options.probe = false;
+          _gopts.rm_options.probe = false;
 
         warn_if_zmd();
 
@@ -3485,7 +3485,7 @@ void Zypper::doCommand()
       }
       // needed to be able to retrieve target distribution
       init_target(*this);
-      this->_gopts.rm_options.servicesTargetDistro =
+      _gopts.rm_options.servicesTargetDistro =
             God->target()->targetDistribution();
       initRepoManager();
       refresh_services(*this);
@@ -4574,7 +4574,7 @@ void Zypper::doCommand()
 
     if (!copts.count("repo") && !copts.count("from")
         && repoManager().knownRepositories().size() > 1)
-      this->out().warning(str::form(_(
+      out().warning(str::form(_(
         "You are about to do a distribution upgrade with all enabled"
         " repositories. Make sure these repositories are compatible before you"
         " continue. See '%s' for more information about this command."),
index fa38cd0..e95ef9b 100644 (file)
@@ -90,7 +90,7 @@ Out::~Out()
 
 bool Out::progressFilter()
 {
-  if (this->verbosity() < Out::NORMAL)
+  if (verbosity() < Out::NORMAL)
       return true;
   return false;
 }
@@ -104,7 +104,7 @@ std::string Out::zyppExceptionReport(const zypp::Exception & e)
   //    - top level error   |<- Exception::historyAsString()
   //    - mid level error   |
   //    - first error      -+
-  if (this->verbosity() > Out::NORMAL)
+  if (verbosity() > Out::NORMAL)
     s << e.asUserHistory();
   else
     s << e.asUserString();
index ded41e2..cf84c84 100644 (file)
@@ -24,8 +24,8 @@
 
 using namespace std;
 
-OutNormal::OutNormal(Verbosity verbosity)
-  : Out(TYPE_NORMAL, verbosity),
+OutNormal::OutNormal(Verbosity verbosity_r)
+  : Out(TYPE_NORMAL, verbosity_r),
     _use_colors(false), _isatty(isatty(STDOUT_FILENO)), _newline(true), _oneup(false)
 {}
 
@@ -42,24 +42,24 @@ bool OutNormal::mine(Type type)
   return false;
 }
 
-bool OutNormal::infoWarningFilter(Verbosity verbosity, Type mask)
+bool OutNormal::infoWarningFilter(Verbosity verbosity_r, Type mask)
 {
   if (!mine(mask))
     return true;
-  if (this->verbosity() < verbosity)
+  if (verbosity() < verbosity_r)
     return true;
   return false;
 }
 
-void OutNormal::info(const std::string & msg, Verbosity verbosity, Type mask)
+void OutNormal::info(const std::string & msg, Verbosity verbosity_r, Type mask)
 {
-  if (infoWarningFilter(verbosity, mask))
+  if (infoWarningFilter(verbosity_r, mask))
     return;
 
   if (!_newline)
     cout << endl;
 
-  if (verbosity == Out::QUIET)
+  if (verbosity_r == Out::QUIET)
     print_color(msg, COLOR_CONTEXT_RESULT);
   else
     print_color(msg, COLOR_CONTEXT_MSG_STATUS);
@@ -68,12 +68,12 @@ void OutNormal::info(const std::string & msg, Verbosity verbosity, Type mask)
   _newline = true;
 }
 
-void OutNormal::infoLine( const TermLine & msg, Verbosity verbosity, Type mask )
-{ info( msg.get( termwidth() ), verbosity, mask ); }
+void OutNormal::infoLine( const TermLine & msg, Verbosity verbosity_r, Type mask )
+{ info( msg.get( termwidth() ), verbosity_r, mask ); }
 
-void OutNormal::warning(const std::string & msg, Verbosity verbosity, Type mask)
+void OutNormal::warning(const std::string & msg, Verbosity verbosity_r, Type mask)
 {
-  if (infoWarningFilter(verbosity, mask))
+  if (infoWarningFilter(verbosity_r, mask))
     return;
 
   if (!_newline)
@@ -90,7 +90,7 @@ void OutNormal::error(const std::string & problem_desc, const std::string & hint
     cout << endl;
 
   fprint_color(cerr, problem_desc, COLOR_CONTEXT_MSG_ERROR);
-  if (!hint.empty() && this->verbosity() > Out::QUIET)
+  if (!hint.empty() && verbosity() > Out::QUIET)
     cerr << endl << hint;
   cerr << endl;
   _newline = true;
@@ -113,7 +113,7 @@ void OutNormal::error(const zypp::Exception & e,
   cerr << endl;
 
   // hint
-  if (!hint.empty() && this->verbosity() > Out::QUIET)
+  if (!hint.empty() && verbosity() > Out::QUIET)
     cerr << hint << endl;
 
   _newline = true;
index 58261e9..e205375 100644 (file)
@@ -15,7 +15,7 @@ using std::string;
 using std::ostringstream;
 using std::vector;
 
-OutXML::OutXML(Verbosity verbosity) : Out(TYPE_XML, verbosity)
+OutXML::OutXML(Verbosity verbosity_r) : Out(TYPE_XML, verbosity_r)
 {
   cout << "<?xml version='1.0'?>" << endl;
   cout << "<stream>" << endl;
@@ -34,11 +34,11 @@ bool OutXML::mine(Type type)
   return false;
 }
 
-bool OutXML::infoWarningFilter(Verbosity verbosity, Type mask)
+bool OutXML::infoWarningFilter(Verbosity verbosity_r, Type mask)
 {
   if (!mine(mask))
     return true;
-  if (this->verbosity() < verbosity)
+  if (verbosity() < verbosity_r)
     return true;
   return false;
 }
@@ -72,18 +72,18 @@ string xmlEncode(const string & s)
 }
 */
 
-void OutXML::info(const string & msg, Verbosity verbosity, Type mask)
+void OutXML::info(const string & msg, Verbosity verbosity_r, Type mask)
 {
-  if (infoWarningFilter(verbosity, mask))
+  if (infoWarningFilter(verbosity_r, mask))
     return;
 
   cout << "<message type=\"info\">" << xml::escape(msg)
        << "</message>" << endl;
 }
 
-void OutXML::warning(const string & msg, Verbosity verbosity, Type mask)
+void OutXML::warning(const string & msg, Verbosity verbosity_r, Type mask)
 {
-  if (infoWarningFilter(verbosity, mask))
+  if (infoWarningFilter(verbosity_r, mask))
     return;
 
   cout << "<message type=\"warning\">" << xml::escape(msg)