aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-09-17 15:39:50 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-09-17 15:39:50 +0200
commitd6be3b97cc3ce723ca3b2372c893b41aec16a9a4 (patch)
tree1afb9ac33041d434eb45f43bf0d7e748ccda7d59
parent2677da127b99bc4e6d904de3f14b8fe3f781740f (diff)
Use nullopt to reset optional
-rw-r--r--bpkg/pkg-disfigure.cxx2
-rw-r--r--bpkg/pkg-fetch.cxx4
-rw-r--r--bpkg/pkg-purge.cxx4
-rw-r--r--bpkg/pkg-unpack.cxx6
-rw-r--r--bpkg/types1
5 files changed, 9 insertions, 8 deletions
diff --git a/bpkg/pkg-disfigure.cxx b/bpkg/pkg-disfigure.cxx
index d9ed811..48e54ba 100644
--- a/bpkg/pkg-disfigure.cxx
+++ b/bpkg/pkg-disfigure.cxx
@@ -82,7 +82,7 @@ namespace bpkg
throw;
}
- p->out_root = optional<dir_path> ();
+ p->out_root = nullopt;
p->state = state::unpacked;
db.update (p);
diff --git a/bpkg/pkg-fetch.cxx b/bpkg/pkg-fetch.cxx
index 1e7072c..a5d216b 100644
--- a/bpkg/pkg-fetch.cxx
+++ b/bpkg/pkg-fetch.cxx
@@ -109,9 +109,9 @@ namespace bpkg
state::fetched,
move (a),
purge,
- optional<dir_path> (), // No source directory yet.
+ nullopt, // No source directory yet.
false,
- optional<dir_path> () // No output directory yet.
+ nullopt // No output directory yet.
});
db.persist (p);
diff --git a/bpkg/pkg-purge.cxx b/bpkg/pkg-purge.cxx
index 57e098d..7663dea 100644
--- a/bpkg/pkg-purge.cxx
+++ b/bpkg/pkg-purge.cxx
@@ -89,7 +89,7 @@ namespace bpkg
if (exists (d)) // Don't complain if someone did our job for us.
rm_r (d);
- p->src_root = optional<dir_path> ();
+ p->src_root = nullopt;
p->purge_src = false;
}
catch (const failed&)
@@ -140,7 +140,7 @@ namespace bpkg
if (exists (a))
rm (a);
- p->archive = optional<path> ();
+ p->archive = nullopt;
p->purge_archive = false;
}
catch (const failed&)
diff --git a/bpkg/pkg-unpack.cxx b/bpkg/pkg-unpack.cxx
index f78543e..6979842 100644
--- a/bpkg/pkg-unpack.cxx
+++ b/bpkg/pkg-unpack.cxx
@@ -65,11 +65,11 @@ namespace bpkg
move (m.name),
move (m.version),
state::unpacked,
- optional<path> (), // No archive
- false, // Don't purge archive.
+ nullopt, // No archive
+ false, // Don't purge archive.
move (ad),
purge,
- optional<dir_path> () // No output directory yet.
+ nullopt // No output directory yet.
});
db.persist (p);
diff --git a/bpkg/types b/bpkg/types
index a5fe114..648c0f1 100644
--- a/bpkg/types
+++ b/bpkg/types
@@ -25,6 +25,7 @@ namespace bpkg
using std::shared_ptr;
using butl::optional;
+ using butl::nullopt;
// <butl/path>
//