OSDN Git Service

[libcalamares] Remove useless variable
authorAdriaan de Groot <groot@kde.org>
Sat, 24 Oct 2020 10:35:19 +0000 (12:35 +0200)
committerAdriaan de Groot <groot@kde.org>
Sat, 24 Oct 2020 10:35:19 +0000 (12:35 +0200)
- describe() is for debugging purposes, doesn't need to calculate
  whether the requirements are accepted.

src/libcalamares/modulesystem/RequirementsModel.cpp

index 9dfab0c..6a7e0a5 100644 (file)
@@ -85,16 +85,11 @@ void
 RequirementsModel::describe() const
 {
     cDebug() << "Requirements model has" << m_requirements.count() << "items";
-    bool acceptable = true;
     int count = 0;
     for ( const auto& r : m_requirements )
     {
         cDebug() << Logger::SubEntry << "requirement" << count << r.name << "satisfied?" << r.satisfied << "mandatory?"
                  << r.mandatory;
-        if ( r.mandatory && !r.satisfied )
-        {
-            acceptable = false;
-        }
         ++count;
     }
 }