Browse Source

Formatting

Wolfgang Ortmann 9 years ago
parent
commit
114589f1b1
3 changed files with 21 additions and 21 deletions
  1. 5 5
      src/KindConfig.cpp
  2. 7 7
      src/excludetools.cpp
  3. 9 9
      src/kind.ag

+ 5 - 5
src/KindConfig.cpp

@@ -57,7 +57,7 @@ bool KindConfig::hasKey(std::string key) const
   auto it = settings.find(key);
   bool found = it != settings.end();
   if (found)
-    used[key]=true;
+    used[key] = true;
   return found;
 }
 
@@ -67,7 +67,7 @@ std::string KindConfig::getString(std::string key) const
   auto it = settings.find(key);
   if (it == settings.end())
     throw Exception("get config key", std::string("No key \"") + key + "\"");
-  used[key]=true;
+  used[key] = true;
   if (it->second.size() != 1)
     throw Exception("get config key", std::string("Key \"") + key + "\" is no single value");
   return it->second[0];
@@ -79,7 +79,7 @@ Strings KindConfig::getStrings(std::string key) const
   auto it = settings.find(key);
   if (it == settings.end())
     throw Exception("get config key", std::string("No key \"") + key + "\"");
-  used[key]=true;
+  used[key] = true;
   return it->second;
 }
 
@@ -89,7 +89,7 @@ bool KindConfig::getBool(std::string key) const
   auto it = settings.find(key);
   if (it == settings.end())
     return false;
-  used[key]=true;
+  used[key] = true;
   if (it->second.size() != 1)
     throw Exception("get config key", std::string("Key \"") + key + "\" is no single value");
   std::string val = it->second[0];
@@ -119,7 +119,7 @@ void KindConfig::warnUnused(const string& prefix) const
   for (auto it = settings.begin(); it != settings.end(); ++it)
     {
       if (used.count(it->first) == 0 || ! used[it->first])
-	cout << "Warning: setting " << it->first << " unused" << endl;
+        cout << "Warning: setting " << it->first << " unused" << endl;
     }
 }
 

+ 7 - 7
src/excludetools.cpp

@@ -34,11 +34,11 @@ Strings getExclusions(const KindConfig& conf)
           int rc;
           Strings excludedFiles = remoteExec(rshCommand, cmd, rc, debug);
           /*
-	    if (rc > 0)
-	    {
-	    // return Strings should contain error messages
-	    throw Exception("Find excludes", "Search for excludes failed");
-	    }
+          if (rc > 0)
+          {
+          // return Strings should contain error messages
+          throw Exception("Find excludes", "Search for excludes failed");
+          }
           */
           for (unsigned int i = 0; i < excludedFiles.size(); ++i)
             {
@@ -47,7 +47,7 @@ Strings getExclusions(const KindConfig& conf)
               debugPrint("Excluding: " + exclusions.back());
             }
         }
-      
+
       string userExcludeFile = conf.getString("userExcludeFile");
       if (!userExcludeFile.empty())
         {
@@ -60,7 +60,7 @@ Strings getExclusions(const KindConfig& conf)
           if (rc == 0)
             exclusions += excludes2;
         } // if (shellMode)
-      
+
     }
   return exclusions;
 }

+ 9 - 9
src/kind.ag

@@ -570,7 +570,7 @@ bool backupVault(const string& vault,
               expireFile << currentSet << "-" << expireTime.getString('m') << endl;
               expireFile << rule << endl;
             }
-	  //  conf.warnUnused();
+          //  conf.warnUnused();
         }
       return backupNow;
     }
@@ -749,16 +749,16 @@ int main(int argc, char* argv[])
         }
 #endif
       if (doBackup)
-	for (string vault : vaults)
-	  {
+        for (string vault : vaults)
+          {
             if (backupVault(vault, conf, imageTime, fullImage, forcedBackupSet))
               writeSizes(logSizeFile);
-	  }
- 
-     if (doExpire)
-	for (string vault : vaults)
-            expireVault(vault, conf, imageTime);
- 
+          }
+
+      if (doExpire)
+        for (string vault : vaults)
+          expireVault(vault, conf, imageTime);
+
       if (!quiet)
         cout << DateTime::now().getString('h') << ": finished" << endl;