]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
- coding style 625/head
authorArvin Schnell <aschnell@suse.de>
Wed, 10 Mar 2021 08:54:45 +0000 (09:54 +0100)
committerArvin Schnell <aschnell@suse.de>
Wed, 10 Mar 2021 08:57:35 +0000 (09:57 +0100)
client/utils/GetOpts.cc
client/utils/GetOpts.h
testsuite/cmp-lt.cc

index 707c930988e27bde502fe2e3ce6d3f56fa1408a8..2a890de12d59abbe9bfb3b20247a7aeda8e5fea0 100644 (file)
@@ -97,7 +97,7 @@ namespace snapper
                    {
                        vector<Option>::const_iterator it = find(options, optopt);
                        if (it == options.end())
-                           SN_THROW(Exception("option not found"));
+                           SN_THROW(OptionsException("option not found"));
 
                        opt = string("--") + it->name;
                    }
@@ -120,7 +120,7 @@ namespace snapper
                {
                    vector<Option>::const_iterator it = c ? find(options, c) : options.begin() + option_index;
                    if (it == options.end())
-                       SN_THROW(Exception("option not found"));
+                       SN_THROW(OptionsException("option not found"));
 
                    result[it->name] = optarg ? optarg : "";
                    break;
@@ -169,7 +169,7 @@ namespace snapper
 
 
     vector<struct option>
-    GetOpts::make_longopts(const vector<Option> options) const
+    GetOpts::make_longopts(const vector<Option>& options) const
     {
        vector<struct option> ret;
 
index d97cbfb8ca804a1588090b08bacc2c89bcb17d89..b23ce86d41e425bd2209bf0059567f6dc27ac8fb 100644 (file)
@@ -103,7 +103,7 @@ namespace snapper
        char** argv;
 
        string make_optstring(const vector<Option>& options) const;
-       vector<struct option> make_longopts(const vector<Option> options) const;
+       vector<struct option> make_longopts(const vector<Option>& options) const;
 
        vector<Option>::const_iterator find(const vector<Option>& options, char c) const;
 
index 1858e2cb0ccfd81063555b4c070d801bc3a3a8cc..5904543c1c279c819b34c02a6e7ad591407ea19c 100644 (file)
@@ -15,7 +15,7 @@ namespace std
     std::ostream&
     operator<<(std::ostream& s, const vector<string>& v)
     {
-       for(std::vector<string>::const_iterator it = v.begin(); it != v.end(); ++it)
+       for (std::vector<string>::const_iterator it = v.begin(); it != v.end(); ++it)
        {
            if (it != v.begin())
                s << " ";